Skip to content

Commit

Permalink
Simplify setting OLD_MINOR_VERSION_BRANCH
Browse files Browse the repository at this point in the history
  • Loading branch information
pallavisontakke committed Feb 7, 2025
1 parent 91fd469 commit 4be6129
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/abi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,12 @@ jobs:
run: |
if [[ "${{ matrix.env }}" == "staging" ]] ;
then
CURRENT_MAIN_VERSION=$(head -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)
CURRENT_MINOR_VERSION=$(echo $CURRENT_MAIN_VERSION | cut -d '.' -f 2)
OLD_MINOR_VERSION=$(echo $CURRENT_MAIN_VERSION | sed -e "s/$CURRENT_MINOR_VERSION/$(($CURRENT_MINOR_VERSION - 1))/g")
echo "BRANCH="${OLD_MINOR_VERSION/%.0/.x}"" >> $GITHUB_ENV
OLD_MINOR_VERSION=$(tail -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)
echo "BRANCH="$(echo ${OLD_MINOR_VERSION%?}x)" >> $GITHUB_ENV
else
echo "BRANCH="${{ matrix.env.BRANCH }}"" >> $GITHUB_ENV
fi
- name: Set BRANCH for development environment
if: matrix.env == 'development'
shell: bash
run: |
echo "BRANCH="${OLD_MINOR_VERSION/%.0/.x}"" >> $GITHUB_ENV
- name: Checkout TimescaleDB
uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 4be6129

Please sign in to comment.