Skip to content

Commit 82d6417

Browse files
fix: align release metadata with tagged version
Co-authored-by: EvalOpsBot <EvalOpsBot@users.noreply.github.com>
1 parent 15262ee commit 82d6417

4 files changed

Lines changed: 36 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,39 @@ jobs:
2626
- name: Extract version
2727
id: get_version
2828
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
29+
30+
- name: Verify release metadata matches tag
31+
env:
32+
TAG_NAME: ${{ steps.get_version.outputs.VERSION }}
33+
run: |
34+
set -euo pipefail
35+
expected_version="${TAG_NAME#v}"
36+
cargo_version="$(python - <<'PY'
37+
import tomllib
38+
from pathlib import Path
39+
40+
print(tomllib.loads(Path("Cargo.toml").read_text())["package"]["version"])
41+
PY
42+
)"
43+
chart_app_version="$(python - <<'PY'
44+
import re
45+
from pathlib import Path
46+
47+
content = Path("charts/diffscope/Chart.yaml").read_text()
48+
match = re.search(r'^appVersion:\s*"?(.*?)"?\s*$', content, re.MULTILINE)
49+
if not match:
50+
raise SystemExit("charts/diffscope/Chart.yaml is missing appVersion")
51+
print(match.group(1))
52+
PY
53+
)"
54+
test "$cargo_version" = "$expected_version" || {
55+
echo "Cargo.toml version ($cargo_version) does not match tag ($expected_version)"
56+
exit 1
57+
}
58+
test "$chart_app_version" = "$expected_version" || {
59+
echo "Chart appVersion ($chart_app_version) does not match tag ($expected_version)"
60+
exit 1
61+
}
2962

3063
- name: Create Release
3164
id: create_release

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "diffscope"
3-
version = "0.5.3"
3+
version = "0.5.26"
44
edition = "2021"
55
authors = ["Jonathan Haas <jonathan@haas.holdings>"]
66
description = "A composable code review engine with smart analysis, confidence scoring, and professional reporting"

charts/diffscope/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: diffscope
33
description: AI-powered code review engine with smart analysis and professional reporting
44
type: application
55
version: 0.1.0
6-
appVersion: "0.5.3"
6+
appVersion: "0.5.26"
77
home: https://github.com/evalops/diffscope
88
sources:
99
- https://github.com/evalops/diffscope

0 commit comments

Comments
 (0)