Skip to content

Commit

Permalink
Add a recipe for tagging a new release using tomato.
Browse files Browse the repository at this point in the history
  • Loading branch information
ceejbot committed Oct 19, 2022
1 parent 05a9483 commit 5e3e819
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"

0 comments on commit 5e3e819

Please sign in to comment.