Tagging script should run the test and force formatting => dirty repo will prevent the tagging

This commit is contained in:
Zykino 2022-10-26 23:54:29 +02:00
parent 6a4fbe3098
commit 75ca5735a8

View File

@ -3,6 +3,12 @@
CURRENT_VERSION=$(grep -E "^version\s?=" Cargo.toml | cut --delimiter='"' --fields=2) CURRENT_VERSION=$(grep -E "^version\s?=" Cargo.toml | cut --delimiter='"' --fields=2)
TAG="v$CURRENT_VERSION" TAG="v$CURRENT_VERSION"
cargo fmt
if ! cargo test; then
exit $?
fi
if cargo publish --dry-run; then if cargo publish --dry-run; then
echo "Creating tag: $TAG" echo "Creating tag: $TAG"
echo "Do not forget to push it: git push origin $TAG" echo "Do not forget to push it: git push origin $TAG"