m3_lightmeter/.github/scripts/increment_build_number.sh
Vadim da4fcfc857
Fixed IAP stub in workflows (#110)
* try using script for iap stub

* typo

* typo

* typo

* removed working dir

* added comment to stub_iap.sh

* checkout first

* increment build number by script

* Update increment_build_number.sh

* fixed iap repo

* stub
2023-09-02 12:45:57 +02:00

8 lines
248 B
Bash

export newVersion="$1"
if [[ -n "$newVersion" ]]; then
#https://stackoverflow.com/a/30214769/13167574
perl -i -pe 's/^(version:\s+)(\d+\.\d+\.\d+)(\+)(\d+)$/$1.$ENV{'newVersion'}.$3.($4+1)/e' pubspec.yaml
else
echo "argument error"
fi