diff --git a/Justfile b/Justfile index 5b86288..963aaa8 100644 --- a/Justfile +++ b/Justfile @@ -14,11 +14,12 @@ install: publish: #!/usr/bin/env bash + set -e echo "Checking if crate can be published..." - VERSION=$(shell grep -E '^version = "[0-9.]+"' Cargo.toml | cut -d'"' -f2) - TAG=v$(VERSION) - echo "Publishing version '$(VERSION)' with tag '$(TAG)'" + VERSION=$(grep -E '^version = "[0-9.]+"' Cargo.toml | cut -d'"' -f2) + TAG="v${VERSION}" + echo "Publishing version '${VERSION}' with tag '${TAG}'" echo "- Publishing crate to crates.io..." echo " - Publishing core..." cargo publish -p subweight-core --allow-dirty -q @@ -27,7 +28,7 @@ publish: echo " - Publishing web..." cargo publish -p subweight-web --allow-dirty -q echo "- Please sign the tag..." - git tag -s -a $(TAG) -m "Version $(VERSION)" + git tag -s -a "${TAG}" -m "Version ${VERSION}" echo "- Pushing tag to GitHub..." - git push -f origin $(TAG) + git push -f origin "${TAG}" echo "Done!"