Skip to content

Change makefile to generate an automatic version for the baseset and newgrfs#223

Merged
zephyris merged 5 commits into
mainfrom
auto-versioning
Dec 15, 2025
Merged

Change makefile to generate an automatic version for the baseset and newgrfs#223
zephyris merged 5 commits into
mainfrom
auto-versioning

Conversation

@zephyris

@zephyris zephyris commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

Versions were hard-coded in various places, problematic as overlooking one can mess up versioning. Versioning used an integer version for the internal version of basesets and NewGRFs (1, 2, 3, ..., 8), and a user-facing semantic version (0.1, 0.2, 0.3, ..., 0.8).

This series of changes:

  1. Expands the makefile to generate an automatic and continuously increasing internal version, using days past 2000-01-01. Additionally, copies the logic from OpenGFX(1) to record repo version data in makefile.vcs, which can be used as a dependency for outputs which depend on these versions for naming.
  2. Updates the baseset obg generating Python script to use the internal and user-facing versions passed from the makefile.
  3. [Fixes a bug in the nml preprocessing Python script]
  4. Updates the NewGRF nml preprocessing Python script to use the internal version passed from the makefile.
  5. Updates the release docs given that internal version is now automatic, and a user-facing semantic version now only needs to be set in one place in the makefile.

The makefile variables and rules for the versions used by the CDN upload prep rules are unchanged.

Comment thread docs/releasing-opengfx2.md Outdated
Comment thread templates/nml_preprocessor.py
Comment thread baseset/baseset_generate_obg.py
@zephyris zephyris force-pushed the auto-versioning branch 3 times, most recently from 000b120 to 564bafa Compare December 14, 2025 18:33
Comment thread baseset/nml/extra/extra-header.pnml Outdated
Comment thread templates/nml_preprocessor.py Outdated
Cache repo version information in makefile.vcs, including generation of a BASESET_VERSION which is guaranteed to increase day-by-day
Passes manually set user-facing version and automatically determined baseset version to the obg-generating Python script (fixes #222)
For lines directly from a pnml, rather than an included pnml, the result from checking for alternate sprites for a line was not used.
Passes automatically determined baseset version as newgrf version to the nml preprocessing Python script
@zephyris zephyris merged commit 22de57c into main Dec 15, 2025
1 check passed
@zephyris zephyris deleted the auto-versioning branch December 15, 2025 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants