Use closest_pushable() for manual releases
change sxzqlpuvlnlmvspvnlkozplpkxyznzsy
commit 44013b61589d2319194a95c29da651c674d25f3e
author Alpha Chen <alpha@kejadlen.dev>
date
parent zmumopuu
diff --git a/justfile b/justfile
index bc2e554..5a91935 100644
--- a/justfile
+++ b/justfile
@@ -83,15 +83,16 @@ all: fmt clippy test
 install:
     cargo install --locked --path quire-server
 
-# Manual release: tag a revision (default: @-) as v<UTC-date>-<short-sha> and push to github.
-# Use this when the normal CI path is not working. Triggers the release workflow.
-manual-release rev="@-":
+# Manual release: tag a revision (default: closest_pushable()) as
+# v<UTC-date>-<short-sha> and push to github. Use this when the normal CI path
+# is not working. Triggers the release workflow.
+manual-release rev="closest_pushable()":
     #!/usr/bin/env bash
     set -euo pipefail
-    sha=$(jj log -r {{rev}} --no-graph -T commit_id --limit 1)
+    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}"
-    jj tag set "$tag" -r {{rev}}
+    jj tag set "$tag" -r "{{rev}}"
     git push github "$tag"
     echo "Tagged and pushed $sha as $tag"