Skip to content

Commit 55212eb

Browse files
authored
Merge pull request #949 from JakeGinnivan/BuildScriptFixes
Bunch of build/deployment script fixes
2 parents 088835c + c6fe1df commit 55212eb

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

build.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Task("Upload-AppVeyor-Artifacts")
149149
"NuGetCommandLineBuild:GitVersion.CommandLine." + nugetVersion +".nupkg",
150150
"NuGetRefBuild:GitVersion." + nugetVersion +".nupkg",
151151
"NuGetTaskBuild:GitVersionTask." + nugetVersion +".nupkg",
152-
"GitVersionTfsTaskBuild:gittools.gitversion." + semVersion +".vsix",
152+
"GitVersionTfsTaskBuild:gittools.gitversion-" + semVersion +".vsix",
153153
"GemBuild:" + gem,
154154
"zip:GitVersion_" + nugetVersion + ".zip",
155155
"releaseNotes:releasenotes.md"

deploy.cake

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#addin "Cake.Json"
22

3+
var target = Argument("target", "Deploy");
4+
35
using System.Net;
46
using System.Linq;
57
using System.Collections.Generic;
@@ -35,6 +37,7 @@ Task("EnsureRequirements")
3537

3638
var tag = "";
3739
Dictionary<string, string> artifactLookup = null;
40+
var publishingError = false;
3841
Task("UpdateVersionInfo")
3942
.IsDependentOn("EnsureRequirements")
4043
.Does(() =>
@@ -67,7 +70,7 @@ Task("Publish-NuGetPackage")
6770
.Does(() =>
6871
{
6972
NuGetPush(
70-
"./releaseArtifacts/" + artifactLookup["NuGetExeBuild"],
73+
"./releaseArtifacts/" + artifactLookup["NuGetRefBuild"],
7174
new NuGetPushSettings {
7275
ApiKey = EnvironmentVariable("NuGetApiKey"),
7376
Source = "https://www.nuget.org/api/v2/package"
@@ -135,9 +138,9 @@ Task("Publish-Gem")
135138
.IsDependentOn("DownloadGitHubReleaseArtifacts")
136139
.Does(() =>
137140
{
138-
var returnCode = StartProcess("gem", new ProcessSettings
141+
var returnCode = StartProcess("cmd", new ProcessSettings
139142
{
140-
Arguments = "push ./releaseArtifacts/" + artifactLookup["NuGetExeBuild"] + " --key " + EnvironmentVariable("GemApiKey")
143+
Arguments = " /c gem push ./releaseArtifacts/" + artifactLookup["GemBuild"] + " --key " + EnvironmentVariable("GemApiKey") + " && exit 0 || exit 1"
141144
});
142145

143146
if (returnCode != 0) {
@@ -151,9 +154,9 @@ Task("Publish-VstsTask")
151154
.IsDependentOn("DownloadGitHubReleaseArtifacts")
152155
.Does(() =>
153156
{
154-
var returnCode = StartProcess("tfx", new ProcessSettings
157+
var returnCode = StartProcess("cmd", new ProcessSettings
155158
{
156-
Arguments = "extension publish --vsix ./releaseArtifacts/" + artifactLookup["GitVersionTfsTaskBuild"] + " --no-prompt --auth-type pat --token " + EnvironmentVariable("GemApiKey")
159+
Arguments = " /c tfx extension publish --vsix ./releaseArtifacts/" + artifactLookup["GitVersionTfsTaskBuild"] + " --no-prompt --auth-type pat --token " + EnvironmentVariable("MarketplaceApiKey") + " && exit 0 || exit 1"
157160
});
158161

159162
if (returnCode != 0) {
@@ -167,12 +170,14 @@ Task("Deploy")
167170
.IsDependentOn("Publish-NuGetCommandLine")
168171
.IsDependentOn("Publish-MsBuildTask")
169172
.IsDependentOn("Publish-Chocolatey")
170-
.IsDependentOn("Publish-Gem")
173+
// .IsDependentOn("Publish-Gem")
171174
.IsDependentOn("Publish-VstsTask")
172175
.Finally(() =>
173176
{
174177
if(publishingError)
175178
{
176179
throw new Exception("An error occurred during the publishing of Cake. All publishing tasks have been attempted.");
177180
}
178-
});
181+
});
182+
183+
RunTarget(target);

deploy.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ http://cakebuild.net
4141
[CmdletBinding()]
4242
Param(
4343
[string]$Script = "deploy.cake",
44-
[string]$Target = "Default",
44+
[string]$Target = "Deploy",
4545
[string]$Configuration = "Release",
4646
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
4747
[string]$Verbosity = "Verbose",

0 commit comments

Comments
 (0)