Skip to content

Commit

Permalink
use dart to bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Manindra de Me committed Dec 5, 2024
1 parent 3a960a1 commit f2a3a42
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/update_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ jobs:
- name: Update Version and Create Tag
run: |
# Read the current version from pubspec.yaml
CURRENT_VERSION=$(grep 'version:' pubspec.yaml | sed 's/version: //')
# Increment the patch version
NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')
# Update pubspec.yaml with new version
sed -i "s/version: $CURRENT_VERSION/version: $NEW_VERSION/" pubspec.yaml
# Bump version
dart pub bump patch
# Get the new version for the commit message
NEW_VERSION=$(grep 'version:' pubspec.yaml | sed 's/version: //')
# Commit and push changes
git config --global user.name "GitHub Actions"
Expand Down

0 comments on commit f2a3a42

Please sign in to comment.