Skip to content

Commit 8665c50

Browse files
authored
Merge branch 'GitTools:support/5.x' into feautre/3021-1
2 parents 3ef4778 + c0b1509 commit 8665c50

File tree

217 files changed

+1688
-1359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+1688
-1359
lines changed

.github/mergify.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pull_request_rules:
1717
- check-success=Unit Test code (windows-latest, net5.0)
1818
- check-success=Unit Test code (windows-latest, net5.0)
1919
- check-success=Unit Test code (windows-latest, net5.0)
20+
- repository-full-name=GitTools/GitVersion # Don't auto-merge PRs in forks
2021
actions:
2122
merge:
2223
- name: Thank contributor

.github/workflows/ci.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ on:
66
- main
77
- 'fix/*'
88
- 'feature/*'
9-
- 'release/*'
9+
- 'support/*'
1010
paths:
1111
- '**'
1212
- '!docs/**'
1313

1414
pull_request:
1515
branches:
1616
- main
17-
- 'release/*'
17+
- 'support/*'
1818
paths:
1919
- '**'
2020
- '!docs/**'
@@ -42,7 +42,7 @@ jobs:
4242
steps:
4343
-
4444
name: Checkout
45-
uses: actions/checkout@v2
45+
uses: actions/checkout@v3
4646
-
4747
name: Cache cake frosting
4848
id: cache-cake
@@ -72,7 +72,7 @@ jobs:
7272
steps:
7373
-
7474
name: Checkout
75-
uses: actions/checkout@v2
75+
uses: actions/checkout@v3
7676
with:
7777
fetch-depth: 0
7878
-
@@ -100,21 +100,21 @@ jobs:
100100
run: dotnet run/build.dll --target=Package
101101
-
102102
name: 'Upload nuget packages'
103-
uses: actions/upload-artifact@v2.3.1
103+
uses: actions/upload-artifact@v3
104104
if: matrix.os == 'windows-latest'
105105
with:
106106
name: nuget
107107
path: ${{ github.workspace }}/artifacts/packages/nuget
108108
-
109109
name: 'Upload native packages'
110-
uses: actions/upload-artifact@v2.3.1
110+
uses: actions/upload-artifact@v3
111111
if: matrix.os == 'windows-latest'
112112
with:
113113
name: native-${{ runner.os }}
114114
path: ${{ github.workspace }}/artifacts/packages/native/*.zip
115115
-
116116
name: 'Upload native packages'
117-
uses: actions/upload-artifact@v2.3.1
117+
uses: actions/upload-artifact@v3
118118
if: matrix.os != 'windows-latest'
119119
with:
120120
name: native-${{ runner.os }}
@@ -135,7 +135,7 @@ jobs:
135135
steps:
136136
-
137137
name: Checkout
138-
uses: actions/checkout@v2
138+
uses: actions/checkout@v3
139139
with:
140140
fetch-depth: 0
141141
-
@@ -174,7 +174,7 @@ jobs:
174174
steps:
175175
-
176176
name: Checkout
177-
uses: actions/checkout@v2
177+
uses: actions/checkout@v3
178178
with:
179179
fetch-depth: 0
180180
-
@@ -192,7 +192,7 @@ jobs:
192192
path: tools
193193
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
194194
-
195-
uses: actions/download-artifact@v2.1.0
195+
uses: actions/download-artifact@v3
196196
name: Download nuget packages
197197
with:
198198
name: nuget
@@ -220,7 +220,7 @@ jobs:
220220
steps:
221221
-
222222
name: Checkout
223-
uses: actions/checkout@v2
223+
uses: actions/checkout@v3
224224
with:
225225
fetch-depth: 0
226226
-
@@ -238,13 +238,13 @@ jobs:
238238
path: tools
239239
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
240240
-
241-
uses: actions/download-artifact@v2.1.0
241+
uses: actions/download-artifact@v3
242242
name: Download nuget packages
243243
with:
244244
name: nuget
245245
path: ${{ github.workspace }}/artifacts/packages/nuget
246246
-
247-
uses: actions/download-artifact@v2.1.0
247+
uses: actions/download-artifact@v3
248248
name: Download native packages
249249
with:
250250
name: native-${{ runner.os }}
@@ -284,7 +284,7 @@ jobs:
284284
steps:
285285
-
286286
name: Checkout
287-
uses: actions/checkout@v2
287+
uses: actions/checkout@v3
288288
with:
289289
fetch-depth: 0
290290
-
@@ -302,7 +302,7 @@ jobs:
302302
path: tools
303303
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
304304
-
305-
uses: actions/download-artifact@v2.1.0
305+
uses: actions/download-artifact@v3
306306
name: Download nuget packages
307307
with:
308308
name: nuget
@@ -382,7 +382,7 @@ jobs:
382382
steps:
383383
-
384384
name: Checkout
385-
uses: actions/checkout@v2
385+
uses: actions/checkout@v3
386386
with:
387387
fetch-depth: 0
388388
-
@@ -400,7 +400,7 @@ jobs:
400400
path: tools
401401
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
402402
-
403-
uses: actions/download-artifact@v2.1.0
403+
uses: actions/download-artifact@v3
404404
name: Download nuget packages
405405
with:
406406
name: nuget
@@ -424,7 +424,7 @@ jobs:
424424
steps:
425425
-
426426
name: Checkout
427-
uses: actions/checkout@v2
427+
uses: actions/checkout@v3
428428
with:
429429
fetch-depth: 0
430430
-
@@ -442,19 +442,19 @@ jobs:
442442
path: tools
443443
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
444444
-
445-
uses: actions/download-artifact@v2.1.0
445+
uses: actions/download-artifact@v3
446446
name: Download native linux packages
447447
with:
448448
name: native-Linux
449449
path: ${{ github.workspace }}/artifacts/packages/native
450450
-
451-
uses: actions/download-artifact@v2.1.0
451+
uses: actions/download-artifact@v3
452452
name: Download native windows packages
453453
with:
454454
name: native-Windows
455455
path: ${{ github.workspace }}/artifacts/packages/native
456456
-
457-
uses: actions/download-artifact@v2.1.0
457+
uses: actions/download-artifact@v3
458458
name: Download native macos packages
459459
with:
460460
name: native-macOS

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
push:
55
branches:
66
- main
7-
- 'release/*'
7+
- 'support/*'
88
paths:
99
- '**'
1010
- '!docs/**'
1111

1212
pull_request:
1313
branches:
1414
- main
15-
- 'release/*'
15+
- 'support/*'
1616
paths:
1717
- '**'
1818
- '!docs/**'
@@ -33,7 +33,7 @@ jobs:
3333
steps:
3434
-
3535
name: Checkout
36-
uses: actions/checkout@v2
36+
uses: actions/checkout@v3
3737
with:
3838
fetch-depth: 0
3939

.github/workflows/docs.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Verify & Publish Docs
33
on:
44
workflow_dispatch:
55
push:
6+
branches:
7+
# - main
8+
- 'support/*'
69
paths:
710
- docs/**
811
- package*.json
@@ -11,6 +14,9 @@ on:
1114
- mkdocs.yml
1215
- .github/workflows/docs.yml
1316
pull_request:
17+
branches:
18+
# - main
19+
- 'support/*'
1420
paths:
1521
- docs/**
1622
- package*.json
@@ -33,7 +39,7 @@ jobs:
3339
steps:
3440
-
3541
name: Checkout
36-
uses: actions/checkout@v2
42+
uses: actions/checkout@v3
3743
with:
3844
fetch-depth: 0
3945
-
@@ -79,7 +85,7 @@ jobs:
7985
steps:
8086
-
8187
name: Checkout
82-
uses: actions/checkout@v2
88+
uses: actions/checkout@v3
8389
with:
8490
fetch-depth: 0
8591
-
@@ -136,7 +142,7 @@ jobs:
136142
steps:
137143
-
138144
name: Checkout
139-
uses: actions/checkout@v2
145+
uses: actions/checkout@v3
140146
with:
141147
fetch-depth: 0
142148
-

.github/workflows/format.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ on:
66
- main
77
- 'fix/*'
88
- 'feature/*'
9-
- 'release/*'
9+
- 'support/*'
1010
paths:
1111
- '**'
1212
- '!docs/**'
1313

1414
pull_request:
1515
branches:
1616
- main
17-
- 'release/*'
17+
- 'support/*'
1818
paths:
1919
- '**'
2020
- '!docs/**'
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
name: DotNet Format
2626
steps:
27-
- uses: actions/checkout@v2.3.4
27+
- uses: actions/checkout@v3
2828
-
2929
name: Setup .NET SDK
3030
uses: actions/setup-dotnet@v2

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Trigger Build flow
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2.3.4
11+
- uses: actions/checkout@v3
1212
- uses: peter-evans/[email protected]
1313
with:
1414
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
## files generated by popular Visual Studio add-ons.
77

88
# User-specific files
9+
.vs
910
*.suo
1011
*.user
1112
*.userprefs

GitVersion.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ assembly-versioning-scheme: MajorMinorPatch
22
branches:
33
main:
44
tag: beta
5+
support:
6+
tag: beta

build/artifacts/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ public void Configure(IServiceCollection services)
1313

1414
services.UseWorkingDirectory(Extensions.GetRootDirectory());
1515

16-
services.UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.8.2"));
16+
services.UseDotnetTool(Tools.GitVersion, Tools.Versions[Tools.GitVersion]);
1717
}
1818
}

build/build/Startup.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public void Configure(IServiceCollection services)
1313

1414
services.UseWorkingDirectory(Extensions.GetRootDirectory());
1515

16-
services.UseTool(new Uri("nuget:?package=NuGet.CommandLine&version=6.0.0"));
17-
services.UseTool(new Uri("dotnet:?package=Codecov.Tool&version=1.13.0"));
18-
services.UseTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.8.2"));
16+
services.UseNugetTool(Tools.NugetCmd, Tools.Versions[Tools.NugetCmd]);
17+
services.UseDotnetTool(Tools.Codecov, Tools.Versions[Tools.Codecov]);
18+
services.UseDotnetTool(Tools.GitVersion, Tools.Versions[Tools.GitVersion]);
1919
}
2020
}

build/build/Tasks/Test/PublishCoverage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public override bool ShouldRun(BuildContext context)
1212
{
1313
var shouldRun = true;
1414
shouldRun &= context.ShouldRun(context.IsOnWindows, $"{nameof(PublishCoverage)} works only on Windows agents.");
15-
shouldRun &= context.ShouldRun(context.IsOnMainOrReleaseBranchOriginalRepo, $"{nameof(PublishCoverage)} works only for on main or release branch original repository.");
15+
shouldRun &= context.ShouldRun(context.IsOnMainOrSupportBranchOriginalRepo, $"{nameof(PublishCoverage)} works only for on main or release branch original repository.");
1616

1717
return shouldRun;
1818
}

build/common/Utilities/BuildContextBase.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ protected BuildContextBase(ICakeContext context) : base(context)
88
public BuildVersion? Version { get; set; }
99

1010
public bool IsOriginalRepo { get; set; }
11+
public string BranchName { get; set; } = string.Empty;
1112
public bool IsMainBranch { get; set; }
12-
public bool IsReleaseBranch { get; set; }
13+
public bool IsSupportBranch { get; set; }
1314
public bool IsPullRequest { get; set; }
1415
public bool IsTagged { get; set; }
1516
public bool IsLocalBuild { get; set; }
@@ -18,7 +19,7 @@ protected BuildContextBase(ICakeContext context) : base(context)
1819
public bool IsOnWindows { get; set; }
1920
public bool IsOnLinux { get; set; }
2021
public bool IsOnMacOS { get; set; }
21-
public bool IsOnMainOrReleaseBranchOriginalRepo => !IsLocalBuild && IsOriginalRepo && (IsMainBranch || IsReleaseBranch) && !IsPullRequest;
22-
public bool IsStableRelease => IsOnMainOrReleaseBranchOriginalRepo && IsTagged;
23-
public bool IsPreRelease => IsOnMainOrReleaseBranchOriginalRepo && !IsTagged;
22+
public bool IsOnMainOrSupportBranchOriginalRepo => !IsLocalBuild && IsOriginalRepo && (IsMainBranch || IsSupportBranch) && !IsPullRequest;
23+
public bool IsStableRelease => IsOnMainOrSupportBranchOriginalRepo && IsTagged;
24+
public bool IsPreRelease => IsOnMainOrSupportBranchOriginalRepo && !IsTagged;
2425
}

build/common/Utilities/BuildLifetimeBase.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ public override void Setup(T context)
1313
context.IsGitHubActionsBuild = buildSystem.IsRunningOnGitHubActions;
1414

1515
context.IsPullRequest = buildSystem.IsPullRequest;
16+
context.BranchName = context.GetBranchName();
1617
context.IsOriginalRepo = context.IsOriginalRepo();
1718
context.IsMainBranch = context.IsMainBranch();
18-
context.IsReleaseBranch = context.IsReleaseBranch();
19+
context.IsSupportBranch = context.IsSupportBranch();
1920
context.IsTagged = context.IsTagged();
2021

2122
context.IsOnWindows = context.IsRunningOnWindows();
@@ -38,8 +39,9 @@ public override void Teardown(T context, ITeardownContext info)
3839

3940
context.Information("Pull Request: {0}", context.IsPullRequest);
4041
context.Information("Original Repo: {0}", context.IsOriginalRepo);
42+
context.Information("Branch Name: {0}", context.BranchName);
4143
context.Information("Main Branch: {0}", context.IsMainBranch);
42-
context.Information("Release Branch: {0}", context.IsReleaseBranch);
44+
context.Information("Support Branch: {0}", context.IsSupportBranch);
4345
context.Information("Tagged: {0}", context.IsTagged);
4446

4547
context.Information("Finished running tasks.");
@@ -61,8 +63,9 @@ protected void LogBuildInformation(T context)
6163
context.Information("OS: {0}", context.GetOS());
6264
context.Information("Pull Request: {0}", context.IsPullRequest);
6365
context.Information("Original Repo: {0}", context.IsOriginalRepo);
66+
context.Information("Branch Name: {0}", context.BranchName);
6467
context.Information("Main Branch: {0}", context.IsMainBranch);
65-
context.Information("Release Branch: {0}", context.IsReleaseBranch);
68+
context.Information("Support Branch: {0}", context.IsSupportBranch);
6669
context.Information("Tagged: {0}", context.IsTagged);
6770
}
6871
}

0 commit comments

Comments
 (0)