Skip to content

Take patch version from -Dversion argument - #3680

Open
yel0h wants to merge 1 commit into
PixelGuys:masterfrom
yel0h:patch-version
Open

yel0h wants to merge 1 commit into
PixelGuys:masterfrom
yel0h:patch-version

Conversation

@yel0h

@yel0h yel0h commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

build.zig now stores the major and minor version in baseMajor and baseMinor. The patch version is taken from -Dversion when it is passed, and defaults to 0 otherwise.

Fixes #3639

Comment thread build.zig
if (b.option([]const u8, "version", "used by the CI to check if the git tag and game version match")) |tagVersion| {
const baseMajor = 0;
const baseMinor = 5;
var patch: usize = 0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you maybe use SemanticVersion.parse here? I would like to be able to search for 0.x.0 to find the string I need to modify when I do an update. You could then also use the format function of SemanticVersion to simplify the formatting code as well.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Allow creating minor versions without having to change the version number in the build.zig.

2 participants