Skip to content

Throw if for some reason we are missing any artifacts. Do not upload … #977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions deploy.cake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ Task("DownloadGitHubReleaseArtifacts")
.ReadAllLines("./releaseArtifacts/artifacts")
.Select(l => l.Split(':'))
.ToDictionary(v => v[0], v => v[1]);

// Have had missing artifacts before, lets fail early in that scenario
if (!artifactLookup.ContainsKey("NuGetRefBuild")) { throw new Exception("NuGetRefBuild" artifact missing); }
if (!artifactLookup.ContainsKey("NuGetCommandLineBuild")) { throw new Exception("NuGetCommandLineBuild" artifact missing); }
if (!artifactLookup.ContainsKey("NuGetTaskBuild")) { throw new Exception("NuGetTaskBuild" artifact missing); }
if (!artifactLookup.ContainsKey("NuGetExeBuild")) { throw new Exception("NuGetExeBuild" artifact missing); }
if (!artifactLookup.ContainsKey("GemBuild")) { throw new Exception("GemBuild" artifact missing); }
if (!artifactLookup.ContainsKey("GitVersionTfsTaskBuild")) { throw new Exception("GitVersionTfsTaskBuild" artifact missing); }
});

Task("Publish-NuGetPackage")
Expand Down Expand Up @@ -152,6 +160,7 @@ Task("Publish-Gem")

Task("Publish-VstsTask")
.IsDependentOn("DownloadGitHubReleaseArtifacts")
.WithCriteria(() => !tag.Contains("-")) // Do not release pre-release to VSTS
.Does(() =>
{
var returnCode = StartProcess("cmd", new ProcessSettings
Expand Down