Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nuke] Use a regex to detect a release branch. #13106

Merged
merged 1 commit into from Oct 2, 2023
Merged

Conversation

grokys
Copy link
Member

@grokys grokys commented Oct 2, 2023

Currently our nuke build system uses a simple Branch.StartsWith("refs/heads/release/") check to detect if the current branch is a release branch. If a release branch is detected, the CI system doesn't append -cibuildXXXXXXX to the version number and instead preserves the version as defined in build/SharedVersion.props.

The problem is that we want to be able to use branches with names such as release/11.0 to track the 11.0.x branch, but these branches are being detected as release branches even though the version number is incomplete.

(Previously we used the stable/0.10.x branch naming scheme but it would be preferable to use release/ instead of stable/ now that both our minor and patch version numbers are technically "stable")

This PR changes the release branch detection code to use a regex (taken from semver.org) to detect whether the current branch is a valid semver version.

Using the suggested regex from semver.org.
@grokys grokys added area-infrastructure Issues related to CI/tooling infrastructur backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Oct 2, 2023
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0040384-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@grokys
Copy link
Member Author

grokys commented Oct 2, 2023

Gah, used the branch I was using for testing instead of the feature branch (they're both at the same HEAD commit). Oh well, the branch will get deleted if it gets merged.

@danwalmsley danwalmsley added this pull request to the merge queue Oct 2, 2023
Merged via the queue into master with commit a7725b0 Oct 2, 2023
7 checks passed
@danwalmsley danwalmsley deleted the release/10.0.5 branch October 2, 2023 15:38
grokys added a commit that referenced this pull request Oct 3, 2023
Using the suggested regex from semver.org.
@grokys grokys added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Issues related to CI/tooling infrastructur backported-11.0.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants