ci(release): hook + release guide cover the fallback header; checker nits

Review on #795:
- Copilot: the pre-commit hook ran check-info-version.sh only for
  dist/info/ or Makefile changes; version_fallback.h now triggers it too.
- Copilot: docs/release-process.md still said to bump only the Makefile
  and check only .info; both places now name all three copies.
- Kimi: missing-file check for all three inputs, set -eu, and the version
  parse stops at the first closing quote (a trailing comment on the
  #define no longer leaks into the value -- tested with a mismatch).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Joseph MattielloandClaude Opus 5.5 committed 2026-10-04 09:22:23 -04:00
1 parent b563b2c38b
commit e671501f85
3 files changed
+13 -10

No files matched your search

+2 -1
View File
@@ -16,7 +16,7 @@ PRs targeting `master` directly trigger a friendly comment from `.github/workflo
## TL;DR
1. Cut `release/X.Y.Z` from `develop`. Bump `CORE_BASE_VERSION` in `Makefile` (or use the `Bump Version & Release` workflow). Update `docs/RELEASE_NOTES_vX.Y.Z.md`. Open a PR from `release/X.Y.Z` → `master`.
1. Cut `release/X.Y.Z` from `develop`. Bump the version in all three places -- `CORE_BASE_VERSION` in `Makefile`, `display_version` in `dist/info/virtualjaguar_libretro.info`, and `CORE_BASE_VERSION` in `src/core/version_fallback.h` (or use the `Bump Version & Release` workflow); `scripts/check-info-version.sh` fails CI if they drift. Update `docs/RELEASE_NOTES_vX.Y.Z.md`. Open a PR from `release/X.Y.Z` → `master`.
2. Merge into `master`.
3. `git tag vX.Y.Z && git push libretro vX.Y.Z` (or via GitHub UI).
4. Watch [Actions](https://github.com/libretro/virtualjaguar-libretro/actions) — `release.yml` builds 16 platforms (14 in the build matrix, plus Vita and Switch in their own jobs), generates `SHA256SUMS.txt`, and publishes the release with `docs/RELEASE_NOTES_vX.Y.Z.md` as the body.
@@ -41,6 +41,7 @@ PRs targeting `master` directly trigger a friendly comment from `.github/workflo
- CI on the release PR is green except `claude-review` (non-blocking; AI review service refuses diffs > 20k lines).
- `docs/WHATSNEW` v`X.Y.Z` section is up-to-date.
- `docs/RELEASE_NOTES_vX.Y.Z.md` exists. (See below for how to generate one.)
- `src/core/version_fallback.h` `CORE_BASE_VERSION` matches the new tag (`scripts/check-info-version.sh` checks all three copies).
- `dist/info/virtualjaguar_libretro.info` is up-to-date — `display_version` matches the new tag, any new feature flags are reflected (`savestate`, `cheats`, `disk_control`, `hw_render`, etc.).
### 2. Tag
+9 -7
View File
@@ -6,22 +6,24 @@
# ship with a stale .info field (RetroArch's "core version" UI) or a stale
# fallback header (v3.6.1 nearly did, #734).
set -e
set -eu
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"
exit 1
fi
for f in "$MAKEFILE" "$INFO" "$FALLBACK"; do
if [ ! -f "$f" ]; then
echo "::error::missing $f"
exit 1
fi
done
# 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)
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"
+2 -2
View File
@@ -27,8 +27,8 @@ if [ -n "$STAGED_C" ]; then
scripts/c89-lint.sh $STAGED_C
fi
# .info / Makefile version sync check
if echo "$STAGED" | grep -qE '^(dist/info/|Makefile$)'; then
# Version sync check: Makefile, .info and the fallback header (#734)
if echo "$STAGED" | grep -qE '^(dist/info/|Makefile$|src/core/version_fallback\.h$)'; then
scripts/check-info-version.sh
fi