Skip to content

Commit 72cebf3

Browse files
committed
fix(release): keep binary version in sync
1 parent d140623 commit 72cebf3

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/toolchain/fingerprint.cppm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import mcpp.toolchain.detect;
1818

1919
export namespace mcpp::toolchain {
2020

21-
inline constexpr std::string_view MCPP_VERSION = "0.0.35";
21+
inline constexpr std::string_view MCPP_VERSION = "0.0.36";
2222

2323
struct FingerprintInputs {
2424
Toolchain toolchain;

tests/e2e/01_help_and_version.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
# Verify --help and --version
44
set -e
55

6+
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
7+
68
out=$("$MCPP" --version)
79
# Version must match `mcpp <SemVer>` — don't pin a specific version here
810
# so this test doesn't break on every release bump.
911
[[ "$out" =~ ^mcpp\ [0-9]+\.[0-9]+\.[0-9]+ ]] \
1012
|| { echo "Bad version output: $out"; exit 1; }
13+
expected="$(awk -F '"' '/^version[[:space:]]*=/{print $2; exit}' "$ROOT/mcpp.toml")"
14+
[[ -n "$expected" ]] || { echo "Failed to read mcpp.toml package version"; exit 1; }
15+
[[ "$out" == "mcpp $expected"* ]] \
16+
|| { echo "Version mismatch: mcpp.toml=$expected, --version='$out'"; exit 1; }
1117

1218
out=$("$MCPP" --help)
1319
[[ "$out" == *"Usage:"* ]] || { echo "--help missing 'Usage:' section"; exit 1; }

0 commit comments

Comments
 (0)