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