Update increment_build_number.sh

This commit is contained in:
Vadim 2023-09-02 12:20:12 +02:00
parent 5e16dca13a
commit a0d09abcc1

View file

@ -1,6 +1,7 @@
export newVersion="$1" export newVersion="$1"
if [[ -n "$newVersion" ]]; then 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 perl -i -pe 's/^(version:\s+)(\d+\.\d+\.\d+)(\+)(\d+)$/$1.$ENV{'newVersion'}.$3.($4+1)/e' pubspec.yaml
else else
echo "argument error" echo "argument error"