Skip to content

Commit 4a37588

Browse files
committed
Merge branch 'master' into feature/informationalversion
2 parents 427a0e3 + fe17357 commit 4a37588

File tree

133 files changed

+1411
-2061
lines changed

Some content is hidden

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

133 files changed

+1411
-2061
lines changed

azure-pipelines.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,22 @@ stages:
7171
- job: Publish
7272
pool:
7373
vmImage: windows-latest
74+
strategy:
75+
matrix:
76+
CI:
77+
TASK_NAME: 'CI'
78+
NuGet:
79+
TASK_NAME: 'NuGet'
80+
Chocolatey:
81+
TASK_NAME: 'Chocolatey'
82+
Gem:
83+
TASK_NAME: 'Gem'
84+
Documentation:
85+
TASK_NAME: 'Documentation'
7486
steps:
7587
- template: build/stages/publish.yml
88+
parameters:
89+
taskName: $(TASK_NAME)
7690

7791
- stage: Release
7892
dependsOn:

build.cake

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,64 @@ Task("Test")
140140
{
141141
});
142142

143+
Task("Publish-CI")
144+
.IsDependentOn("Publish-AppVeyor")
145+
.IsDependentOn("Publish-AzurePipeline")
146+
.Finally(() =>
147+
{
148+
if (publishingError)
149+
{
150+
throw new Exception("An error occurred during the publishing of GitVersion.");
151+
}
152+
});
153+
154+
Task("Publish-Gem")
155+
.IsDependentOn("Publish-Gem-Internal")
156+
.Finally(() =>
157+
{
158+
if (publishingError)
159+
{
160+
throw new Exception("An error occurred during the publishing of GitVersion.");
161+
}
162+
});
163+
164+
Task("Publish-NuGet")
165+
.IsDependentOn("Publish-NuGet-Internal")
166+
.Finally(() =>
167+
{
168+
if (publishingError)
169+
{
170+
throw new Exception("An error occurred during the publishing of GitVersion.");
171+
}
172+
});
173+
174+
Task("Publish-Chocolatey")
175+
.IsDependentOn("Publish-Chocolatey-Internal")
176+
.Finally(() =>
177+
{
178+
if (publishingError)
179+
{
180+
throw new Exception("An error occurred during the publishing of GitVersion.");
181+
}
182+
});
183+
184+
Task("Publish-Documentation")
185+
.IsDependentOn("Publish-Documentation-Internal")
186+
.Finally(() =>
187+
{
188+
if (publishingError)
189+
{
190+
throw new Exception("An error occurred during the publishing of GitVersion.");
191+
}
192+
});
193+
143194
Task("Publish")
144195
.IsDependentOn("Publish-AppVeyor")
145196
.IsDependentOn("Publish-AzurePipeline")
146-
.IsDependentOn("Publish-NuGet")
147-
.IsDependentOn("Publish-Chocolatey")
148-
.IsDependentOn("Publish-Gem")
149-
.IsDependentOn("Publish-Documentation")
197+
.IsDependentOn("Publish-NuGet-Internal")
198+
.IsDependentOn("Publish-Chocolatey-Internal")
199+
.IsDependentOn("Publish-Gem-Internal")
200+
.IsDependentOn("Publish-Documentation-Internal")
150201
.Finally(() =>
151202
{
152203
if (publishingError)

build.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
2-
CAKE_VERSION=0.35
2+
CAKE_VERSION=0.36
33
DOTNET_VERSION=2.1.802,3.1.100

build/publish.cake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Task("Publish-AzurePipeline")
8181
publishingError = true;
8282
});
8383

84-
Task("Publish-Gem")
84+
Task("Publish-Gem-Internal")
8585
.WithCriteria<BuildParameters>((context, parameters) => parameters.EnabledPublishGem, "Publish-Gem was disabled.")
8686
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsRunningOnWindows, "Publish-Gem works only on Windows agents.")
8787
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsRunningOnAzurePipeline, "Publish-Gem works only on AzurePipeline.")
@@ -109,7 +109,7 @@ Task("Publish-Gem")
109109
publishingError = true;
110110
});
111111

112-
Task("Publish-NuGet")
112+
Task("Publish-NuGet-Internal")
113113
.WithCriteria<BuildParameters>((context, parameters) => parameters.EnabledPublishNuget, "Publish-NuGet was disabled.")
114114
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsRunningOnWindows, "Publish-NuGet works only on Windows agents.")
115115
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsRunningOnAzurePipeline, "Publish-NuGet works only on AzurePipeline.")
@@ -147,7 +147,7 @@ Task("Publish-NuGet")
147147
publishingError = true;
148148
});
149149

150-
Task("Publish-Chocolatey")
150+
Task("Publish-Chocolatey-Internal")
151151
.WithCriteria<BuildParameters>((context, parameters) => parameters.EnabledPublishChocolatey, "Publish-Chocolatey was disabled.")
152152
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsRunningOnWindows, "Publish-Chocolatey works only on Windows agents.")
153153
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsRunningOnAzurePipeline, "Publish-Chocolatey works only on AzurePipeline.")

build/stages/publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
parameters:
2+
taskName: ''
3+
14
steps:
25
- template: common-steps.yml
36
- task: UseRubyVersion@0
@@ -12,7 +15,7 @@ steps:
1215
source: current
1316
path: $(Build.SourcesDirectory)
1417
artifact: storage
15-
- script: dotnet cake build.cake --bootstrap && dotnet cake build.cake --target=Publish
18+
- script: dotnet cake build.cake --bootstrap && dotnet cake build.cake --target=Publish-${{ parameters.taskName }}
1619
displayName: '[Publish]'
1720
env:
1821
GITHUB_TOKEN: $(GITHUB_TOKEN)
@@ -21,7 +24,6 @@ steps:
2124
CHOCOLATEY_API_KEY: $(CHOCOLATEY_API_KEY)
2225
CHOCOLATEY_API_URL: $(CHOCOLATEY_API_URL)
2326
RUBY_GEM_API_KEY: $(RUBY_GEM_API_KEY)
24-
TFX_TOKEN: $(TFX_TOKEN)
2527
ENABLED_PUBLISH_GEM: $(ENABLED_PUBLISH_GEM)
2628
ENABLED_PUBLISH_TFS: $(ENABLED_PUBLISH_TFS)
2729
ENABLED_PUBLISH_NUGET: $(ENABLED_PUBLISH_NUGET)

build/utils/utils.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static bool IsOnMainBranch(this ICakeContext context)
4545
}
4646
else if (buildSystem.IsRunningOnAzurePipelines || buildSystem.IsRunningOnAzurePipelinesHosted)
4747
{
48-
repositoryBranch = buildSystem.TFBuild.Environment.Repository.Branch;
48+
repositoryBranch = buildSystem.TFBuild.Environment.Repository.SourceBranchName;
4949
}
5050

5151
context.Information("Repository Branch: {0}" , repositoryBranch);

build/wyam.cake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ Task("Force-Publish-Documentation")
5252
PublishDocumentation(parameters);
5353
});
5454

55-
Task("Publish-Documentation")
55+
Task("Publish-Documentation-Internal")
5656
.IsDependentOn("Clean-Documentation")
5757
.WithCriteria(() => DirectoryExists(MakeAbsolute(Directory("docs"))), "Wyam documentation directory is missing")
5858
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsRunningOnWindows, "Publish-Documentation is ran only on Windows agents.")
5959
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsRunningOnAzurePipeline, "Publish-Documentation is ran only on AzurePipeline.")
60-
.WithCriteria<BuildParameters>((context, parameters) => !parameters.IsPullRequest, "Publish-Documentation works only for non-PR commits.")
60+
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsStableRelease() || parameters.IsPreRelease(), "Publish-Documentation works only for non-PR commits.")
6161
.Does<BuildParameters>((parameters) =>
6262
{
6363
// Check to see if any documentation has changed

docs/input/docs/configuration.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,18 @@ When using `mode: ContinuousDeployment`, the value specified in
137137
`continuous-delivery-fallback-tag` will be used as the pre-release tag for
138138
branches which do not have one specified. Default set to `ci`.
139139

140+
Just to clarify: For a build name without `...-ci-<buildnumber>` or in other
141+
words without a `PreReleaseTag` (ergo `"PreReleaseTag":""` in GitVersion's JSON output)
142+
at the end you would need to set `continuous-delivery-fallback-tag` to an empty string (`''`):
143+
144+
```yaml
145+
mode: ContinuousDeployment
146+
continuous-delivery-fallback-tag: ''
147+
...
148+
```
149+
150+
Doing so can be helpful if you use your `master` branch as a `release` branch.
151+
140152
### tag-prefix
141153

142154
A regex which is used to trim git tags before processing (eg v1.0.0). Default is

src/GitVersion.sln.GhostDoc.xml

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/GitVersionCore.Tests/AssemblyFileVersionTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Shouldly;
33
using GitVersion.Extensions;
44
using GitVersion;
5+
using GitVersionCore.Tests.Helpers;
56

67
namespace GitVersionCore.Tests
78
{

0 commit comments

Comments
 (0)