Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 77aa0b8

Browse files
committed
Use prefix for NuGet releases.
1 parent 58d5c93 commit 77aa0b8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

build.cake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Task("Test")
5353
.IsDependentOn("VerifyCodeGen")
5454
.Does(() =>
5555
{
56-
foreach (var projectPath in GetFiles("tests/**/*Tests.csproj").Select(x => x.FullPath))
56+
foreach (var projectPath in GetFiles("tests/**/*.csproj").Select(x => x.FullPath))
5757
DotNetCoreTest(projectPath, new DotNetCoreTestSettings { Configuration = configuration });
5858
});
5959

@@ -80,7 +80,7 @@ Task("UpdateDocs")
8080

8181
var outputPath = $"release/{docsRepoBranch}/reference";
8282
var buildBranch = EnvironmentVariable("APPVEYOR_REPO_BRANCH");
83-
var isPreview = buildBranch != "master" || !Regex.IsMatch(trigger, @"^(v[0-9]+\.[0-9]+\.[0-9]+|update-docs)$");
83+
var isPreview = buildBranch != "master" || !Regex.IsMatch(trigger, @"^(nuget-v[0-9]+\.[0-9]+\.[0-9]+|update-docs)$");
8484
if (isPreview)
8585
outputPath += $"/preview/{buildBranch}";
8686

@@ -127,9 +127,9 @@ Task("NuGetPublish")
127127
throw new InvalidOperationException($"Mismatched package versions '{version}' and '{nupkgVersion}'.");
128128
}
129129

130-
if (!string.IsNullOrEmpty(nugetApiKey) && (trigger == null || Regex.IsMatch(trigger, "^v[0-9]")))
130+
if (!string.IsNullOrEmpty(nugetApiKey) && (trigger == null || Regex.IsMatch(trigger, "^nuget-v[0-9]")))
131131
{
132-
if (trigger != null && trigger != $"v{version}")
132+
if (trigger != null && trigger != $"nuget-v{version}")
133133
throw new InvalidOperationException($"Trigger '{trigger}' doesn't match package version '{version}'.");
134134

135135
var pushSettings = new NuGetPushSettings { ApiKey = nugetApiKey, Source = nugetSource };
@@ -138,7 +138,7 @@ Task("NuGetPublish")
138138
}
139139
else
140140
{
141-
Information("To publish NuGet packages, push this git tag: v" + version);
141+
Information("To publish NuGet packages, push this git tag: nuget-v" + version);
142142
}
143143
});
144144

0 commit comments

Comments
 (0)