Now makes sure the tree is clean so it won't push anything you aren't expecting.

This commit is contained in:
Travis Reeder
2017-05-27 10:19:40 -07:00
parent f93ec459a3
commit 9618e23238

View File

@@ -4,8 +4,20 @@ set -ex
user="treeder"
service="functions"
tag="latest"
version_file="api/version/version.go"
# 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="api/version/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