From 5e3e8198b4b65e8f48f6fb2491113cd3263470d6 Mon Sep 17 00:00:00 2001 From: C J Silverio Date: Wed, 19 Oct 2022 16:37:52 -0700 Subject: [PATCH] Add a recipe for tagging a new release using tomato. --- justfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/justfile b/justfile index 1b393b6..232a736 100644 --- a/justfile +++ b/justfile @@ -21,3 +21,18 @@ release: @tar f {{tarfile}} -r MALCOLM CATS SEEDS SHIPS STAR_FIGHTING @gzip {{tarfile}} @echo "Release artifact in {{tarfile}}.gz" + +# Set the crate version and tag the repo to match. +tag VERSION: + #!/usr/bin/env bash + status=$(git status --porcelain) + if [ "$status" != "" ]; then + echo "There are uncommitted changes! Cowardly refusing to act." + exit 1 + fi + tomato set package.version {{VERSION}} Cargo.toml + # update the lock file + cargo check + git commit Cargo.toml Cargo.lock -m "v{{VERSION}}" + git tag "v{{VERSION}}" + echo "Release tagged for version v{{VERSION}}"