Skip to content

Control when an attempt is made to upload releasenotes.md #1093

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 3 commits into from
Nov 26, 2016
Merged
Show file tree
Hide file tree
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
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should anything in the .vscode folder be committed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asbjornu I wasn't aware of any rule that it shouldn't be. That file is an easy way to share the required launch command for debugging build.cake file in VSCode.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these are the settings for debugging and should be committed (one of the three file: settings.json, tasks.json and launch.json which should be under version control)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asbjornu See also here, where they are also explicitely excluded in the .gitignore file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pascalberger nice, I can add that to the gitignore file. Just away to sign off for the night though, so if Travis ever finishes, and we are all happy, feel free to merge, and I can fix that later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gep13 Unfortunately a test case, not releated to the release notes, failed on OS X: https://travis-ci.org/GitTools/GitVersion/jobs/177131223.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gep13, @pascalberger: Okay, good to know. I agree that it should be in the .gitignore just to make it explicit. 🙂

The set_PriorityClass problem is hopefully fixed by GitTools/GitTools.Core#38, but we need to get that released somehow. Kind of related to this PR, but for different reasons and another repository. 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmh, as long as this is not fixed, we can't merge this PR, except by overriding the required status checks. So to cleanly merge this we would need to have the GitTools.Core release and update GitVersion to the new GitTools.Core version in this PR.

14 changes: 11 additions & 3 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -120,6 +121,7 @@ Task("Zip-Files")

Task("Create-Release-Notes")
.IsDependentOn("Build")
.WithCriteria(() => IsMainGitVersionRepo && IsMainGitVersionBranch && !IsPullRequest)
.Does(() =>
{
var githubToken = EnvironmentVariable("GitHubToken");
Expand Down Expand Up @@ -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");
Expand All @@ -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");
}
}
});


Expand Down
5 changes: 5 additions & 0 deletions tools/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake" version="0.17.0" />
<package id="Cake.CoreCLR" version="0.17.0" />
</packages>