diff --git a/usr/bin/release.sh b/usr/bin/release.sh index 90ff8cd..06da26b 100755 --- a/usr/bin/release.sh +++ b/usr/bin/release.sh @@ -9,6 +9,11 @@ e() { eval "$1" } +if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then + echo -e "\033[1;31mgit working directory not clean, please commit your changes first \033[0m" + exit 1 +fi + GEM_NAME="timely-app" VERSION=$(grep -Eo "VERSION\s*=\s*'.+'" lib/timely-app.rb | grep -Eo "[0-9.]{5,}") GEM_FILE="$GEM_NAME-$VERSION.gem"