mirror of
https://github.com/libretro/virtualjaguar-libretro.git
synced 2026-11-07 12:47:58 -10:00
ci(release): check-info-version.sh checks all three version copies
The version lives in the Makefile, dist/info and src/core/version_fallback.h.
The script compared only the first two; v3.6.1's stale fallback header was
caught by a different CI job ('duplicated lists in sync') instead. Now it
fails naming the fallback file when that one drifts. Verified: passes on
develop (all v3.6.1), fails with exit 1 when the fallback says v3.6.0.
docs/agent/github.md's release step lists all three.
Fixes #734
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
52910daea2
commit
b563b2c38b
2 files changed
+23
-7
No files matched your search
@@ -83,8 +83,9 @@ Cutting a release:
|
||||
|
||||
1. `git checkout develop && git checkout -b release/vX.Y.Z`
|
||||
2. Bump version (all must match): `Makefile` → `CORE_BASE_VERSION := vX.Y.Z`;
|
||||
`dist/info/virtualjaguar_libretro.info` → `display_version = "vX.Y.Z"`; `src/core/version.h`
|
||||
auto-generated (gitignored, `bash scripts/gen-version-h.sh` or rebuild).
|
||||
`dist/info/virtualjaguar_libretro.info` → `display_version = "vX.Y.Z"`;
|
||||
`src/core/version_fallback.h` → `#define CORE_BASE_VERSION "vX.Y.Z"` (used when the generated
|
||||
`src/core/version.h` is absent). `bash scripts/check-info-version.sh` checks all three (#734).
|
||||
3. Release notes: `docs/RELEASE_NOTES_vX.Y.Z.md` (template: `docs/RELEASE_NOTES_v2.3.0.md`) —
|
||||
highlights, bug fixes, perf, testing, known issues, stats (`git diff --shortstat
|
||||
vPREV..HEAD`), downloads, maintainers.
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# Verify dist/info/virtualjaguar_libretro.info `display_version` matches
|
||||
# the Makefile's CORE_BASE_VERSION. Run on every CI build so a release
|
||||
# can't ship with a stale .info field that would mislead RetroArch's
|
||||
# "core version" UI.
|
||||
# Verify the three copies of the version agree: the Makefile's
|
||||
# CORE_BASE_VERSION, dist/info/virtualjaguar_libretro.info `display_version`,
|
||||
# and src/core/version_fallback.h's CORE_BASE_VERSION (used when the
|
||||
# generated version.h is absent). Run on every CI build so a release can't
|
||||
# ship with a stale .info field (RetroArch's "core version" UI) or a stale
|
||||
# fallback header (v3.6.1 nearly did, #734).
|
||||
|
||||
set -e
|
||||
|
||||
ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
||||
INFO="$ROOT/dist/info/virtualjaguar_libretro.info"
|
||||
MAKEFILE="$ROOT/Makefile"
|
||||
FALLBACK="$ROOT/src/core/version_fallback.h"
|
||||
|
||||
if [ ! -f "$INFO" ]; then
|
||||
echo "::error::missing $INFO"
|
||||
@@ -18,6 +21,7 @@ fi
|
||||
# Portable across BSD/GNU sed.
|
||||
MAKE_VER=$(sed -n 's/^CORE_BASE_VERSION[[:space:]]*:*=[[:space:]]*\(.*\)/\1/p' "$MAKEFILE" | head -1)
|
||||
INFO_VER=$(sed -n 's/^display_version[[:space:]]*=[[:space:]]*"\(.*\)"/\1/p' "$INFO" | head -1)
|
||||
FALLBACK_VER=$(sed -n 's/^#define[[:space:]]*CORE_BASE_VERSION[[:space:]]*"\(.*\)"/\1/p' "$FALLBACK" | head -1)
|
||||
|
||||
if [ -z "$MAKE_VER" ]; then
|
||||
echo "::error::could not parse CORE_BASE_VERSION from $MAKEFILE"
|
||||
@@ -28,10 +32,21 @@ if [ -z "$INFO_VER" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$FALLBACK_VER" ]; then
|
||||
echo "::error::could not parse CORE_BASE_VERSION from $FALLBACK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$MAKE_VER" != "$INFO_VER" ]; then
|
||||
echo "::error::version mismatch: Makefile CORE_BASE_VERSION=$MAKE_VER, .info display_version=$INFO_VER"
|
||||
echo "Update dist/info/virtualjaguar_libretro.info \`display_version\` to match before tagging."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "OK: CORE_BASE_VERSION = display_version = $MAKE_VER"
|
||||
if [ "$MAKE_VER" != "$FALLBACK_VER" ]; then
|
||||
echo "::error::version mismatch: Makefile CORE_BASE_VERSION=$MAKE_VER, src/core/version_fallback.h CORE_BASE_VERSION=$FALLBACK_VER"
|
||||
echo "Update src/core/version_fallback.h to match before tagging."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "OK: Makefile = .info display_version = version_fallback.h = $MAKE_VER"
|
||||
Reference in new issue
Block a user