mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
delete tool directory since it has no tools in it and add release.sh script
This commit is contained in:
committed by
Travis Reeder
parent
cdf4ba1f96
commit
3433f1756c
30
release.sh
Normal file
30
release.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
user="iron"
|
||||
service="functions"
|
||||
version_file="api/server/version.go"
|
||||
tag="latest"
|
||||
|
||||
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"
|
||||
|
||||
./scripts/build-docker.sh
|
||||
|
||||
git add -u
|
||||
git commit -m "$service: $version release"
|
||||
git tag -a "$version" -m "version $version"
|
||||
git push
|
||||
git push --tags
|
||||
|
||||
# Finally tag and push docker images
|
||||
docker tag $user/$service:$tag $user/$service:$version
|
||||
|
||||
docker push $user/$service:$version
|
||||
docker push $user/$service:$tag
|
||||
Reference in New Issue
Block a user