diff --git a/release.sh b/release.sh index 21ecfbd..d395c0e 100755 --- a/release.sh +++ b/release.sh @@ -1,10 +1,12 @@ #!/usr/bin/env bash set -e +git diff --quiet HEAD || (echo "please revert the uncommited changes"; exit 1) + SPARK_VERSION="${1?Missing required argument: semver}" sed -i '' -e "s/SPARK_VERSION = .*/SPARK_VERSION = '$SPARK_VERSION'/" lib/constants.js -git add . +git add lib/constants.js git commit -m v"$SPARK_VERSION" git tag -s v"$SPARK_VERSION" -m v"$SPARK_VERSION" git push