krz/orgo

Lightning fast org-mode static site generator. fast go org-mode static-site-generator

Commit 0f024f4c31

0f024f4c31c7795bee7178f36372236e536e3ea5

parent: 262b2ad426

Verified · cmc ci/pages: success ci/test: success

cmc <hello@cleberg.net> · 2026-08-30 16:34 UTC

Extract the version with cargo pkgid rather than python3

The runner is a Debian box running dash; assuming python3 there because the
GitHub runner had it is how a release job fails at the version check.

Layout: unified · split

.gitbay/release.sh +1 −2
@@ -20,8 +20,7 @@ repo="${GITBAY_REPO:?no repository in GITBAY_REPO}"
20# The tag is the source of truth for the version, checked rather than trusted: a 20# The tag is the source of truth for the version, checked rather than trusted: a
21# release tagged v0.18.0 whose binary reports 0.17.0 is the kind of thing nobody 21# release tagged v0.18.0 whose binary reports 0.17.0 is the kind of thing nobody
22# notices for months. 22# notices for months.
23version=$(cargo metadata --no-deps --format-version 1 | 23version=$(cargo pkgid | sed 's/.*[#@]//')
24 python3 -c 'import json,sys; print(json.load(sys.stdin)["packages"][0]["version"])')
25if [ "$tag" != "v$version" ]; then 24if [ "$tag" != "v$version" ]; then
26 echo "tag $tag does not match Cargo.toml version $version" >&2 25 echo "tag $tag does not match Cargo.toml version $version" >&2
27 exit 1 26 exit 1
.githooks/pre-push +1 −2
@@ -26,8 +26,7 @@ while read -r _local_ref _local_sha remote_ref _remote_sha; do
26 esac 26 esac
27 tag=${remote_ref#refs/tags/} 27 tag=${remote_ref#refs/tags/}
28 28
29 version=$(cargo metadata --no-deps --format-version 1 --manifest-path "$root/Cargo.toml" | 29 version=$(cargo pkgid --manifest-path "$root/Cargo.toml" | sed 's/.*[#@]//')
30 python3 -c 'import json,sys; print(json.load(sys.stdin)["packages"][0]["version"])')
31 if [ "$tag" != "v$version" ]; then 30 if [ "$tag" != "v$version" ]; then
32 echo "pre-push: tag $tag does not match Cargo.toml version $version" >&2 31 echo "pre-push: tag $tag does not match Cargo.toml version $version" >&2
33 exit 1 32 exit 1