2022-09-18 20:46:03 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
CURRENT_VERSION=$(grep -E "^version\s?=" Cargo.toml | cut --delimiter='"' --fields=2)
|
|
|
|
TAG="v$CURRENT_VERSION"
|
|
|
|
|
2022-10-26 23:54:29 +02:00
|
|
|
cargo fmt
|
|
|
|
|
|
|
|
if ! cargo test; then
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|
2022-09-18 20:46:03 +02:00
|
|
|
if cargo publish --dry-run; then
|
|
|
|
echo "Creating tag: $TAG"
|
|
|
|
echo "Do not forget to push it: git push origin $TAG"
|
|
|
|
|
|
|
|
git tag -a "$TAG" -m "Version $CURRENT_VERSION"
|
|
|
|
else
|
|
|
|
exit $?
|
|
|
|
fi
|