From 75ca5735a8eeb1462207721d2bbed22d042f13b5 Mon Sep 17 00:00:00 2001 From: Zykino Date: Wed, 26 Oct 2022 23:54:29 +0200 Subject: [PATCH] Tagging script should run the test and force formatting => dirty repo will prevent the tagging --- scripts/git-tag.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/git-tag.sh b/scripts/git-tag.sh index ceff317..7d92371 100755 --- a/scripts/git-tag.sh +++ b/scripts/git-tag.sh @@ -3,6 +3,12 @@ CURRENT_VERSION=$(grep -E "^version\s?=" Cargo.toml | cut --delimiter='"' --fields=2) TAG="v$CURRENT_VERSION" +cargo fmt + +if ! cargo test; then + exit $? +fi + if cargo publish --dry-run; then echo "Creating tag: $TAG" echo "Do not forget to push it: git push origin $TAG"