Skip to content

Commit e805023

Browse files
committed
upgraded to gitversion 6
1 parent adcc01c commit e805023

File tree

2 files changed

+60
-67
lines changed

2 files changed

+60
-67
lines changed

.github/workflows/publish.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,15 @@ jobs:
1818
with:
1919
fetch-depth: 0 # fetch-depth is needed for GitVersion
2020

21-
- name: Install GitVersion
22-
uses: gittools/actions/gitversion/setup@v3
21+
- name: Install GitVersion
22+
uses: gittools/actions/gitversion/setup@v3.1.11
2323
with:
24-
versionSpec: '5.x'
25-
includePrerelease: true
24+
versionSpec: '6.0.x'
2625

2726
- name: Determine Version
28-
uses: gittools/actions/gitversion/execute@v3
27+
uses: gittools/actions/gitversion/execute@v3.1.11
2928
with:
30-
useConfigFile: true
31-
#additionalArguments: /b develop
29+
updateProjectFiles: true
3230
id: gitversion # step id used as reference for output values
3331

3432
- name: Setup dotnet
@@ -42,7 +40,6 @@ jobs:
4240

4341
- name: Build Release
4442
run: |
45-
dotnet-gitversion /updateprojectfiles
4643
dotnet build Terminal.Gui/Terminal.Gui.csproj --no-incremental --nologo --force --configuration Release
4744
dotnet test Terminal.Gui/Terminal.Gui.csproj --configuration Release
4845

GitVersion.yml

+55-59
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,88 @@
1-
# This file is used to configure GitVersion to work with the GitFlow branching strategy.
1+
# This file configures GitVersion 6.x to work with Terminal.Gui's GitFlow branching strategy.
22
#
3-
# Terminal.Gui uses the GitFlow branching strategy.
3+
# Terminal.Gui uses the GitFlow branching strategy.
44
# https://gitversion.net/docs/learn/branching-strategies/gitflow/
55
#
66
# - We have two main branches: `v2_release` and `v2_develop`.
7-
# - `v2_release` is the main branch for V2 releases and always matches the latest release package on Nuget (e.g. 2.0.0);
8-
# prior to release it is a pre-release package (e.g. 2.0.0-prealpha.1).
9-
# - `v2_develop` is the main branch for V2 development and is always a pre-release package (e.g. 2.0.0-develop.1).
10-
# - We do all development work on feature branches off of `v2_develop`.
11-
# - When we deem it time to do a release, we merge the feature branches into `v2_develop` and then `v2_develop` into `v2_release`.
12-
# - The ./.github/workflows/publish.yml file is configured to build and publish on pushes to `v2_develop` and `v2_release`.
13-
#
14-
# We currently use GitVersion 5.1
7+
# - `v2_release` is the main branch for V2 releases and matches the latest NuGet release package (e.g., 2.0.0);
8+
# prior to release, it uses pre-release labels (e.g., 2.0.0-prealpha.1).
9+
# - `v2_develop` is the development branch for V2 and always carries a pre-release label (e.g., 2.1.0-develop.1).
10+
# - Development happens on feature branches off `v2_develop`.
11+
# - For releases, we merge feature branches into `v2_develop`, then `v2_develop` into `v2_release`.
12+
# - The ./.github/workflows/publish.yml builds and publishes on pushes to `v2_develop` and `v2_release`.
1513
#
1614
# Branches:
17-
# - v1_release: This is `main` branch for V1
18-
# - v1_develop: This is `develop` branch for V1
19-
# - v2_release: This is `main` branch for V2
20-
# - v2_develop: This is `develop` branch for V2
15+
# - v1_release: Main branch for V1 (historical)
16+
# - v1_develop: Develop branch for V1 (historical)
17+
# - v2_release: Main branch for V2
18+
# - v2_develop: Develop branch for V2
19+
#
20+
# Package Naming:
21+
# - from v2_develop: 2.1.0-develop.1 (minor version increments)
22+
# - from v2_release (pre-release): 2.0.0-prealpha.1 or 2.0.0-beta.1
23+
# - from v2_release (release): 2.0.0 (patch version increments)
2124
#
22-
# Package Naming:
23-
# - from v2_develop: v2.0.0-develop.1
24-
# - from v2_release: Prior to Release: v2.0.0-beta.1 or v2.0.0-alpha.1 or v2.0.0-prealpha.1
25-
# - from v2_release: Release: v2.0.0
26-
#
25+
mode: ContinuousDeployment # GitVersion 6.x uses Mainline mode for GitFlow, focusing on main branch releases
2726

28-
# We prefix our tags with a 'v' or 'V' (e.g. v1.0.0)
27+
# We prefix our tags with 'v' or 'V' (e.g., v1.0.0)
2928
tag-prefix: '[vV]'
3029

31-
# This is legacy from v1 and probably can be removed - see tag: develop below
32-
continuous-delivery-fallback-tag: dev
33-
3430
branches:
35-
# V2 Branches
31+
# V2 Development Branch
3632
develop:
37-
# We don't really use ContinuousDeployment, but ContinuousDelivery - I don't remember why we have this here but it works.
38-
mode: ContinuousDeployment
39-
tag: develop
33+
# Matches the v2_develop branch
4034
regex: v2_develop
41-
tracks-release-branches: true
42-
is-source-branch-for: ['main']
35+
# Adds 'develop' as pre-release label (e.g., 2.1.0-develop.1)
36+
label: develop
37+
# Increments minor version (x.y+1.z) on commits
38+
increment: Minor
39+
# No source branches specified as this is the root of development
4340
source-branches: []
41+
# Indicates this branch feeds into release branches
42+
tracks-release-branches: true
4443

44+
# V2 Release Branch
4545
main:
46-
# We don't really use ContinuousDeployment, but ContinuousDelivery - I don't remember why we have this here but it works.
47-
mode: ContinuousDeployment
48-
49-
# For V2 releases, prior to Alpha we use prealpha.
50-
tag: prealpha
46+
# Matches the v2_release branch
5147
regex: v2_release
52-
is-release-branch: true
53-
54-
# This tells GitVersion that the main (branch is the source branch for the develop branch.
48+
# Uses 'prealpha' as pre-release label before official release
49+
label: prealpha
50+
# Increments patch version (x.y.z+1) on commits
51+
increment: Patch
52+
# Specifies v2_develop as the source branch
5553
source-branches: ['develop']
5654

57-
# V1 Branches - These are really just here for reference.
55+
# V1 Branches - Included for historical reference
5856
v1_develop:
59-
mode: ContinuousDeployment
60-
tag: v1_develop
6157
regex: v1_develop
62-
source-branches:
63-
- v1_release
58+
label: v1_develop
59+
increment: Minor
60+
source-branches: ['v1_release']
61+
# Lower weight keeps V1 pre-releases sorted below V2
6462
pre-release-weight: 100
6563

6664
v1_release:
67-
mode: ContinuousDeployment
6865
regex: v1_release
69-
is-release-branch: true
66+
# Empty label for stable releases
67+
label: ''
68+
increment: Patch
7069
source-branches: ['v1_develop']
7170

72-
# Pull Request Branches
73-
# I don't fully understand this, but it seems to work
71+
# Pull Request Branches
72+
# Configures versioning for PRs (e.g., 2.0.0-pr.feature-123.1)
7473
pull-request:
75-
mode: ContinuousDeployment
76-
tag: PullRequest.{BranchName}
77-
increment: Inherit
78-
tag-number-pattern: '[/-](?<number>\d+)'
74+
# Matches typical PR branch names
7975
regex: ^(pull|pull\-requests|pr)[/-]
76+
# Uses 'pr' prefix with branch name in the label (e.g., pr.feature-123)
77+
label: pr.{BranchName}
78+
# Inherits increment strategy from source branch
79+
increment: Inherit
8080
source-branches:
81-
- develop
82-
- main
83-
- feature
84-
- support
85-
- hotfix
81+
- develop
82+
- main
83+
# High weight ensures PR versions sort after regular pre-releases
8684
pre-release-weight: 30000
8785

88-
# I don't remember why we have this here but it works.
86+
# Ignore specific commits if needed (currently empty)
8987
ignore:
90-
sha: []
91-
92-
88+
sha: []

0 commit comments

Comments
 (0)