aboutsummaryrefslogtreecommitdiff
path: root/justfile
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-09-16 18:43:23 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-09-16 18:43:23 +0300
commit3f78f172d9f9fe1a9422334c5ae03cd5ac685ebd (patch)
tree3f6a141652b4480a4934fc6b85032a5c9a5eb158 /justfile
parent36db8ff3f4bee21b06f3208422be7cf91c7d3e40 (diff)
fix: address release promotion review findings
Diffstat (limited to 'justfile')
-rw-r--r--justfile52
1 files changed, 26 insertions, 26 deletions
diff --git a/justfile b/justfile
index 88fc0315..5c42bee6 100644
--- a/justfile
+++ b/justfile
@@ -153,10 +153,10 @@ pre-release-check:
@echo "release policy: do not update skills/herdr/SKILL.md between stable releases; preview builds keep the latest stable skill."
# Publish a preview by pushing an admin-owned tag at the selected source commit.
-preview ref='HEAD':
+preview $ref='HEAD':
git fetch --prune origin '+refs/heads/master:refs/remotes/origin/master' '+refs/heads/release/*:refs/remotes/origin/release/*' --tags
@set -eu; \
- commit="$(python3 scripts/release.py preview-source --commit '{{ref}}')"; \
+ commit="$(python3 scripts/release.py preview-source --commit "$ref")"; \
day="$(git show -s --format=%cs "$commit")"; \
short="$(git rev-parse --short=12 "$commit")"; \
tag="preview-$day-$short"; \
@@ -164,8 +164,8 @@ preview ref='HEAD':
git push origin "refs/tags/$tag"
# In a checkout based on the selected preview, prepare release-only metadata.
-release-prepare version preview:
- @printf '%s\n' '{{version}}' | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' || { \
+release-prepare $version $preview:
+ @printf '%s\n' "$version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' || { \
echo "error: version must look like 0.6.6 without a v prefix"; \
exit 1; \
}
@@ -176,25 +176,25 @@ release-prepare version preview:
exit 1; \
fi
@git fetch origin master --tags
- @if git rev-parse "v{{version}}" >/dev/null 2>&1; then \
- echo "error: tag v{{version}} already exists"; \
+ @if git rev-parse "v$version" >/dev/null 2>&1; then \
+ echo "error: tag v$version already exists"; \
exit 1; \
fi
- python3 scripts/release.py check-source --preview '{{preview}}'
+ python3 scripts/release.py check-source --preview "$preview"
just pre-release-check
- python3 scripts/changelog.py prepare --version {{version}}
+ python3 scripts/changelog.py prepare --version "$version"
cp CHANGELOG.md docs/next/CHANGELOG.md
- sed -i.bak 's/^version = ".*"/version = "{{version}}"/' Cargo.toml && rm -f Cargo.toml.bak
+ sed -i.bak "s/^version = \".*\"/version = \"$version\"/" Cargo.toml && rm -f Cargo.toml.bak
cargo update -p herdr --offline
just check
git add CHANGELOG.md docs/next/CHANGELOG.md Cargo.toml Cargo.lock skills/herdr/SKILL.md
- git diff --cached --quiet || git commit -m "release: v{{version}}"
- python3 scripts/release.py check-source --preview '{{preview}}'
- @echo "v{{version}} release commit prepared. Review it, then run: just release-publish {{version}} {{preview}}"
+ git diff --cached --quiet || git commit -m "release: v$version"
+ python3 scripts/release.py check-source --preview "$preview"
+ @echo "v$version release commit prepared. Review it, then run: just release-publish $version $preview"
# Tag a prepared preview-based release; never move master to the release candidate.
-release-publish version preview:
- @printf '%s\n' '{{version}}' | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' || { \
+release-publish $version $preview:
+ @printf '%s\n' "$version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' || { \
echo "error: version must look like 0.6.6 without a v prefix"; \
exit 1; \
}
@@ -203,28 +203,28 @@ release-publish version preview:
exit 1; \
fi
@git fetch origin master --tags
- @if git rev-parse "v{{version}}" >/dev/null 2>&1; then \
- echo "error: tag v{{version}} already exists"; \
+ @if git rev-parse "v$version" >/dev/null 2>&1; then \
+ echo "error: tag v$version already exists"; \
exit 1; \
fi
@cargo_version="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)"; \
- if [ "$cargo_version" != "{{version}}" ]; then \
- echo "error: Cargo.toml version $cargo_version does not match {{version}}"; \
+ if [ "$cargo_version" != "$version" ]; then \
+ echo "error: Cargo.toml version $cargo_version does not match $version"; \
exit 1; \
fi
just release-docs-check
- python3 scripts/changelog.py extract --version {{version}} --output /tmp/herdr-release-notes-check.md
+ python3 scripts/changelog.py extract --version "$version" --output /tmp/herdr-release-notes-check.md
rm -f /tmp/herdr-release-notes-check.md
@previous="$(git show origin/master:distribution/latest.json | python3 -c 'import json,sys; print("v" + json.load(sys.stdin)["version"])')"; \
- python3 scripts/release.py check --preview '{{preview}}' --version '{{version}}' --previous "$previous" && \
- git tag -a v{{version}} -m "v{{version}}" -m "Preview: {{preview}}" -m "Previous-Stable: $previous"
- git push origin v{{version}}
- @echo "v{{version}} released — GitHub Actions building binaries and updating distribution/latest.json"
+ python3 scripts/release.py check --preview "$preview" --version "$version" --previous "$previous" && \
+ git tag -a "v$version" -m "v$version" -m "Preview: $preview" -m "Previous-Stable: $previous"
+ git push origin "v$version"
+ @echo "v$version released — GitHub Actions building binaries and updating distribution/latest.json"
# Prepare and promote a published preview, not the latest master.
-release version preview:
- just release-prepare {{version}} {{preview}}
- just release-publish {{version}} {{preview}}
+release $version $preview:
+ just release-prepare "$version" "$preview"
+ just release-publish "$version" "$preview"
# Print default config
default-config: