mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fixing fn release script.
This commit is contained in:
@@ -2,14 +2,40 @@
|
||||
|
||||
set -ex
|
||||
|
||||
# ensure working dir is clean
|
||||
git status
|
||||
if [[ -z $(git status -s) ]]
|
||||
then
|
||||
echo "tree is clean"
|
||||
else
|
||||
echo "tree is dirty, please commit changes before running this"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git pull
|
||||
|
||||
version_file="version.go"
|
||||
if [ -z $(grep -m1 -Eo "[0-9]+\.[0-9]+\.[0-9]+" $version_file) ]; then
|
||||
echo "did not find semantic version in $version_file"
|
||||
exit 1
|
||||
fi
|
||||
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)
|
||||
echo "Version: $version"
|
||||
|
||||
#cd lambda
|
||||
#./release.sh
|
||||
#cd ..
|
||||
|
||||
make dep
|
||||
# make dep
|
||||
make release
|
||||
|
||||
version=$1
|
||||
git add -u
|
||||
git commit -m "fn tool: $version release [skip ci]"
|
||||
# todo: might make sense to move this into it's own repo so it can have it's own versioning at some point, uncomment git commands below if so
|
||||
# git tag -f -a "$version" -m "version $version"
|
||||
git push
|
||||
# git push origin $version
|
||||
|
||||
# For GitHub
|
||||
# url='https://api.github.com/repos/treeder/functions/releases'
|
||||
|
||||
Reference in New Issue
Block a user