Skip to content

Commit

Permalink
release.sh: fail on dirty git
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
  • Loading branch information
bajtos committed Jun 12, 2024
1 parent dea2ee6 commit 8e4d275
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 8e4d275

Please sign in to comment.