summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xprepare6
1 files changed, 5 insertions, 1 deletions
diff --git a/prepare b/prepare
index 2d18fb0..35fe28b 100755
--- a/prepare
+++ b/prepare
@@ -137,7 +137,7 @@ done
# not prevent someone from being stupid, but they can avoid some
# common errors. We want to reduce surprises/ensure consistency.
#
-VTAG=$(git describe --abbrev=0 2>/dev/null || true);
+VTAG=$(git describe --tags --abbrev=0 2>/dev/null || true);
if test -z "${VTAG}"; then
printf "E: you need to tag at least one commit!\n";
exit 1;
@@ -150,6 +150,10 @@ if test $(git ls-remote --tags origin ${VTAG} | wc -l) -eq 0; then
printf "E: tag '%s' does not exist on origin!\n" "${VTAG}";
exit 1;
fi
+if test $(git status --porcelain | wc -l) -gt 0; then
+ printf "E: tree is not clean; aborting!\n" "${VTAG}";
+ exit 1;
+fi
##