diff --git a/docs/release-process.md b/docs/release-process.md index c1143e29..4ec77b91 100644 --- a/docs/release-process.md +++ b/docs/release-process.md @@ -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 diff --git a/scripts/check-info-version.sh b/scripts/check-info-version.sh index 73c8a7f2..7c3bf52e 100755 --- a/scripts/check-info-version.sh +++ b/scripts/check-info-version.sh @@ -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" diff --git a/scripts/install-hooks.sh b/scripts/install-hooks.sh index fb894dab..722be142 100755 --- a/scripts/install-hooks.sh +++ b/scripts/install-hooks.sh @@ -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