Repository navigation
feat(plugin): bump native MAJOR_REVISION to 2 for 2.0 (#1114) - #1471
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/resolve-plugin-version.sh→include/sbpp_version.inc, mirroring the panel's three-tier version resolution:SBPP_RELEASE_VERSION— release CI (GITHUB_REF_NAME, e.g.2.0.0)web/configs/version.json— same file asSbpp\Version::resolve()git describe→devfallbacksourcebanspp.incandsbpp_checker.sp#include <sbpp_version>(no hand-editedSB_VERSIONin headers).sbpp_version.incwithSB_VERSION "dev"so directspcompstill 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.ymlrunsresolve-plugin-version.shthen compiles*.*.*tag,release.ymlsetsSBPP_RELEASE_VERSIONand plugins build withSB_VERSION "2.0.0"PluginVersionResolveTest(PHPUnit)bash game/addons/sourcemod/scripting/scripts/resolve-plugin-version.shthenspcomp …