Skip to content

Commit 7da114b

Browse files
committed
fix(versioning): match both branch names so cross-branch versioning is correct
1 parent 031b569 commit 7da114b

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

GitVersion.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@ assembly-file-versioning-scheme: MajorMinorPatch
1717
mode: Mainline
1818

1919
branches:
20-
legacy:
21-
regex: '^legacy$'
20+
# Both release branch names match on purpose, even though this file is only ever read
21+
# from legacy. The GitHub Actions runner tells GitVersion which branch it is on through
22+
# GITHUB_REF, and GitVersion trusts that over the branch actually checked out. The
23+
# combined pipeline checks out the OTHER branch to version it, so a run triggered from
24+
# fivem-enhanced would otherwise find no matching entry here, fall back to the default
25+
# config and label the build 3.2.26-fivem-enhanced.0. Matching both names makes the
26+
# answer depend on the repository being read rather than on which branch triggered.
27+
mainline:
28+
regex: '^(legacy|fivem-enhanced)$'
2229
increment: Patch
2330
is-mainline: true
2431
# An empty tag means no pre-release label, so builds are a plain 3.2.25. GitVersion

0 commit comments

Comments
 (0)