From ff1a426b032ab6abebc271f0f0e1bbb2c4727d22 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Mon, 24 Feb 2025 17:41:48 +0100 Subject: [PATCH] Fix 'just publish' Signed-off-by: Oliver Tale-Yazdi --- Justfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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!"