diff --git a/release.sh b/release.sh index a441f325c..04b6a5e4e 100755 --- a/release.sh +++ b/release.sh @@ -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