Only publish repo artifacts if they exist

This commit is contained in:
Pranav K 2016-02-29 18:47:28 -08:00
parent 2405a2f2f4
commit d5ca369239
1 changed files with 3 additions and 2 deletions

View File

@ -355,7 +355,8 @@ var buildTarget = "compile"
Exec("build.cmd", buildTarget, repo); Exec("build.cmd", buildTarget, repo);
} }
if (!string.IsNullOrEmpty(ciVolatileShare)) var repoArtifacts = Path.Combine(repo, "artifacts", "build");
if (!string.IsNullOrEmpty(ciVolatileShare) && Directory.Exists(repoArtifacts))
{ {
Log.Info("Publishing packages to " + ciVolatileShare); Log.Info("Publishing packages to " + ciVolatileShare);
if (string.IsNullOrEmpty(nugetExe)) if (string.IsNullOrEmpty(nugetExe))
@ -364,7 +365,7 @@ var buildTarget = "compile"
} }
else else
{ {
NuGetPackagesAdd(Path.Combine(repo, "artifacts", "build"), ciVolatileShare); NuGetPackagesAdd(repoArtifacts, ciVolatileShare);
} }
} }