From 8e4d27520dcd95054b77d0adb0f9d91651f76917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Wed, 12 Jun 2024 16:47:31 +0200 Subject: [PATCH] release.sh: fail on dirty git MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miroslav Bajtoš --- release.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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