Skip to content

Commit

Permalink
Fix deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisDuarte1 committed Sep 28, 2023
1 parent 60bd141 commit 38d7561
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,26 @@ jobs:
if: github.ref == 'refs/heads/master'
run: |
git fetch origin develop
current_hash=$(git rev-parse HEAD)
current_hash=$(git rev-parse origin/develop)
echo "DEVELOPHASH=$current_hash" >> $GITHUB_ENV
- name: Bump flutter patch version
if: github.ref == 'refs/heads/develop' || (github.ref == 'refs/heads/master' && $${{github.sha == env.DEVELOPHASH}})
if: github.ref == 'refs/heads/develop' || github.sha != env.DEVELOPHASH
run: perl -i -pe 's/^(\d+\.\d+\.)(\d+)(\+)(\d+)$/$1.($2+1).($3).($4+1)/e' ${{ env.APP_VERSION_PATH }}

- name: Bump flutter minor version
if: github.ref == 'refs/heads/master' && $${{github.sha == env.DEVELOPHASH}}
if: github.ref == 'refs/heads/master' && github.sha == env.DEVELOPHASH
run: perl -i -pe 's/^(\d+)(\.)(\d+)(\.)(\d+)(\+)(\d+)$/$1.($2).($3+1).($4).(0).($6).($7+1)/e' ${{ env.APP_VERSION_PATH }}

- name: Copy app version to pubspec
run: cat ${{ env.APP_VERSION_PATH }} | perl -i -pe 's/^(version:\s+)(\d+\.\d+\.\d+\+\d+)$/$1.(<STDIN>)/e' ${{ env.PUBSPEC_PATH }}

- name: debug cansdo
run: git --no-pager diff

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Bump app version [no ci]"

- name: Propagate master version bump to develop
if: github.ref == 'refs/heads/master'
run: git push --force-with-lease origin HEAD:develop
Expand Down

0 comments on commit 38d7561

Please sign in to comment.