diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..d6e240d081 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,19 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "program": "${workspaceRoot}/tools/Cake.CoreCLR/Cake.dll", + "args": [ + "${workspaceRoot}/build.cake", + "--debug", + "--verbosity=diagnostic" + ], + "cwd": "${workspaceRoot}", + "stopAtEntry": true, + "externalConsole": false + } + ] +} \ No newline at end of file diff --git a/build.cake b/build.cake index 9e37d47c5d..a9da3088f9 100644 --- a/build.cake +++ b/build.cake @@ -14,6 +14,7 @@ bool IsTagged = (BuildSystem.AppVeyor.Environment.Repository.Tag.IsTag && !string.IsNullOrWhiteSpace(BuildSystem.AppVeyor.Environment.Repository.Tag.Name)); bool IsMainGitVersionRepo = StringComparer.OrdinalIgnoreCase.Equals("gittools/gitversion", BuildSystem.AppVeyor.Environment.Repository.Name); bool IsPullRequest = BuildSystem.AppVeyor.Environment.PullRequest.IsPullRequest; +bool IsMainGitVersionBranch = StringComparer.OrdinalIgnoreCase.Equals("master", BuildSystem.AppVeyor.Environment.Repository.Branch); void Build(string configuration, string nugetVersion, string semVersion, string version, string preReleaseTag) { @@ -120,6 +121,7 @@ Task("Zip-Files") Task("Create-Release-Notes") .IsDependentOn("Build") + .WithCriteria(() => IsMainGitVersionRepo && IsMainGitVersionBranch && !IsPullRequest) .Does(() => { var githubToken = EnvironmentVariable("GitHubToken"); @@ -160,8 +162,7 @@ Task("Upload-AppVeyor-Artifacts") "NuGetTaskBuild:GitVersionTask." + nugetVersion +".nupkg", "GitVersionTfsTaskBuild:gittools.gitversion-" + semVersion +".vsix", "GemBuild:" + gem, - "zip:GitVersion_" + nugetVersion + ".zip", - "releaseNotes:releasenotes.md" + "zip:GitVersion_" + nugetVersion + ".zip" }); AppVeyor.UploadArtifact("build/NuGetExeBuild/GitVersion.Portable." + nugetVersion +".nupkg"); @@ -171,8 +172,15 @@ Task("Upload-AppVeyor-Artifacts") AppVeyor.UploadArtifact("build/GitVersionTfsTaskBuild/gittools.gitversion-" + semVersion + ".vsix"); AppVeyor.UploadArtifact("build/GitVersion_" + nugetVersion + ".zip"); AppVeyor.UploadArtifact("build/GemBuild/" + gem); - AppVeyor.UploadArtifact("build/releasenotes.md"); AppVeyor.UploadArtifact("build/artifacts"); + + if(IsMainGitVersionRepo && IsMainGitVersionBranch && !IsPullRequest) + { + if(FileExists("build/releasenotes.md")) + { + AppVeyor.UploadArtifact("build/releasenotes.md"); + } + } }); diff --git a/tools/packages.config b/tools/packages.config new file mode 100644 index 0000000000..4bc41f6930 --- /dev/null +++ b/tools/packages.config @@ -0,0 +1,5 @@ + + + + +