diff --git a/.github/scripts/update_build_number.sh b/.github/scripts/update_build_number.sh new file mode 100755 index 00000000..a825324e --- /dev/null +++ b/.github/scripts/update_build_number.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Get the number of commits +commit_count=$(git rev-list --count HEAD) + +# Update the pubspec.yaml file with the new build number +sed -i '' "s/version: \(.*\)+.*/version: \1+$commit_count/" ../../pubspec.yaml \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 05f87da0..2f64f529 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.2.9+29 +version: 1.2.9+1697 environment: sdk: '>=3.0.0 <4.0.0'