mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Merge pull request #198 from fnproject/bumpies
update bump script to be slightly less brittle, all perl syntax
This commit is contained in:
@@ -15,12 +15,12 @@ fi
|
|||||||
git pull
|
git pull
|
||||||
|
|
||||||
version_file="version.go"
|
version_file="version.go"
|
||||||
if [ -z $(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file) ]; then
|
if [ -z $(grep -m1 -Po '(?<= = ")\d+\.\d+\.\d+' $version_file) ]; then
|
||||||
echo "did not find semantic version in $version_file"
|
echo "did not find semantic version in $version_file"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
perl -i -pe 's/\d+\.\d+\.\K(\d+)/$1+1/e' $version_file
|
perl -i -pe 's/(?<= = ")\d+\.\d+\.\K(\d+)/$1+1/e' $version_file
|
||||||
version=$(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file)
|
version=$(grep -m1 -Po '(?<= = ")\d+\.\d+\.\d+' $version_file)
|
||||||
echo "Version: $version"
|
echo "Version: $version"
|
||||||
|
|
||||||
#cd lambda
|
#cd lambda
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ fi
|
|||||||
git pull
|
git pull
|
||||||
|
|
||||||
version_file="main.go"
|
version_file="main.go"
|
||||||
if [ -z $(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file) ]; then
|
if [ -z $(grep -m1 -Po '(?<= = ")\d+\.\d+\.\d+' $version_file) ]; then
|
||||||
echo "did not find semantic version in $version_file"
|
echo "did not find semantic version in $version_file"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
perl -i -pe 's/\d+\.\d+\.\K(\d+)/$1+1/e' $version_file
|
perl -i -pe 's/(?<= = ")\d+\.\d+\.\K(\d+)/$1+1/e' $version_file
|
||||||
version=$(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file)
|
version=$(grep -m1 -Po '(?<= = ")\d+\.\d+\.\d+' $version_file)
|
||||||
echo "Version: $version"
|
echo "Version: $version"
|
||||||
|
|
||||||
make docker-build
|
make docker-build
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ fi
|
|||||||
git pull
|
git pull
|
||||||
|
|
||||||
version_file="api/version/version.go"
|
version_file="api/version/version.go"
|
||||||
if [ -z $(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file) ]; then
|
if [ -z $(grep -m1 -Po '(?<= = ")\d+\.\d+\.\d+' $version_file) ]; then
|
||||||
echo "did not find semantic version in $version_file"
|
echo "did not find semantic version in $version_file"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
perl -i -pe 's/\d+\.\d+\.\K(\d+)/$1+1/e' $version_file
|
perl -i -pe 's/(?<= = ")\d+\.\d+\.\K(\d+)/$1+1/e' $version_file
|
||||||
version=$(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file)
|
version=$(grep -m1 -Po '(?<= = ")\d+\.\d+\.\d+' $version_file)
|
||||||
echo "Version: $version"
|
echo "Version: $version"
|
||||||
|
|
||||||
make docker-build
|
make docker-build
|
||||||
|
|||||||
Reference in New Issue
Block a user