Skip to content

feat(plugin): bump native MAJOR_REVISION to 2 for 2.0 (#1114) - #1471

Merged
rumblefrog merged 4 commits into
mainfrom
feat/plugin-native-major-2-0-1114
May 26, 2026
Merged

rumblefrog merged 4 commits into
mainfrom
feat/plugin-native-major-2-0-1114

Conversation

@rumblefrog

@rumblefrog rumblefrog commented May 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Introduce scripts/resolve-plugin-version.sh → include/sbpp_version.inc, mirroring the panel's three-tier version resolution:
    1. SBPP_RELEASE_VERSION — release CI (GITHUB_REF_NAME, e.g. 2.0.0)
    2. web/configs/version.json — same file as Sbpp\Version::resolve()
    3. git describe → dev fallback
  • sourcebanspp.inc and sbpp_checker.sp #include <sbpp_version> (no hand-edited SB_VERSION in headers).
  • Checked-in sbpp_version.inc with SB_VERSION "dev" so direct spcomp still works without running the script.
  • MAJOR_REVISION / SOURCEBANSPP_VERSION_* stay the native API epoch marker (aligned on tag builds); not a blanket recompile mandate.

Closes #1114.

Test plan

  • plugin-build.yml runs resolve-plugin-version.sh then compiles
  • On *.*.* tag, release.yml sets SBPP_RELEASE_VERSION and plugins build with SB_VERSION "2.0.0"
  • PluginVersionResolveTest (PHPUnit)
  • Local: bash game/addons/sourcemod/scripting/scripts/resolve-plugin-version.sh then spcomp …

Signal that third-party plugins must recompile against sourcebanspp.inc,
document checker native/library changes from #1032/#1034/#1431, align
SB_VERSION with 2.0.0, and add plugin-author guidance to the 1.8→2.0
upgrade doc plus CHANGELOG cross-links.
Adversarial review: MAJOR_REVISION aligns with panel 2.0; existing
third-party .smx using prior SBPP APIs generally keep working. Narrow
rebuild guidance to checker library detection, new checker natives,
and optional post-admin forward adoption.
…1114)

Add resolve-plugin-version.sh (release tag → version.json → git describe
→ dev) generating sbpp_version.inc; wire release.yml and plugin-build.yml;
include from sourcebanspp.inc and sbpp_checker.sp. Checked-in dev fallback
for direct spcomp builds.
Pin MAJOR_REVISION to native API epoch 2 (not release tag major),
keep MINOR_REVISION independent of panel semver minor, fail closed
when version.json is readable without php, and guard generated inc
with locale-safe sanitization. Expand PHPUnit (backup/restore, isolated
output, php-missing tier) and release.yml asserts on stamped sbpp_version.inc.
@rumblefrog
rumblefrog added this pull request to the merge queue May 26, 2026
Merged via the queue into main with commit 0f7c38e May 26, 2026
9 checks passed
@rumblefrog
rumblefrog deleted the feat/plugin-native-major-2-0-1114 branch May 26, 2026 17:51
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump SourceMod plugin natives MAJOR_REVISION for 2.0

1 participant