Add `just tag` recipe for the github mirror
Assisted-by: Claude Opus 4.7 (1M context) via Claude Code
diff --git a/justfile b/justfile
index 645e289..2c23d3b 100644
--- a/justfile
+++ b/justfile
@@ -82,3 +82,15 @@ all: fmt clippy test
install:
cargo install --locked --path .
+
+# Tag a revision (default: @-) as v<UTC-date>-<short-sha> for the github mirror.
+tag rev="@-":
+ #!/usr/bin/env bash
+ set -euo pipefail
+ sha=$(jj log -r {{rev}} --no-graph -T commit_id --limit 1)
+ short=${sha:0:8}
+ date=$(TZ=UTC git show -s --format=%cd --date=format-local:%Y-%m-%d "$sha")
+ tag="v${date}-${short}"
+ git tag "$tag" "$sha"
+ echo "Tagged $sha as $tag"
+ echo "Push with: git push github $tag"