Skip to content
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

(GH-8) Provide alternative tool paths #9

Merged
merged 3 commits into from
May 2, 2017
Merged

Conversation

fwinkelbauer
Copy link
Contributor

No description provided.

@fwinkelbauer
Copy link
Contributor Author

fwinkelbauer commented Apr 28, 2017

I will rebase+merge this PR after #5 is closed

@gep13 Can you walk me through the process on how we can ship version 0.2.0? Is there something special I need to do (e.g. so that GitVersion works as expected), or do I simple create a PR from develop to master after dealing with this PR?

@fwinkelbauer fwinkelbauer changed the title Alternative tool paths #8 Provide alternative tool paths Apr 28, 2017
@fwinkelbauer fwinkelbauer changed the title #8 Provide alternative tool paths (GH-8) Provide alternative tool paths Apr 28, 2017
This is a first draft to provide alternative tool paths for metrics.exe
based on a ToolVersion parameter. Currently VS2013 and VS2015 are
supported
@fwinkelbauer fwinkelbauer force-pushed the alternativeToolPaths branch from 0fc026e to 1b797dc Compare April 28, 2017 11:04
@fwinkelbauer fwinkelbauer modified the milestone: 0.2.0 Apr 28, 2017
@fwinkelbauer fwinkelbauer merged commit 41ce4ed into develop May 2, 2017
@fwinkelbauer fwinkelbauer deleted the alternativeToolPaths branch May 2, 2017 19:05
cake-contrib-bot pushed a commit that referenced this pull request May 2, 2017
Merge pull request #9 from cake-contrib/alternativeToolPaths

(GH-8) Provide alternative tool paths
@gep13
Copy link
Member

gep13 commented May 2, 2017

@fwinkelbauer let me see if I can help you out with some of this...

Although perhaps poorly named, the Environment.SetVariableNames is used to set the names of Environment Variables, not to set the values of the Environment Variables. Cake.Recipe expected that there are going to be a number to Environment Variables that are configured with some default names. These are listed here:

https://cake-contrib.github.io/Cake.Recipe/docs/fundamentals/environment-variables

As an example, you can see all the Environment Variables here within our Appveyor Configuration:

image

If for whatever reason, you already have the required information in another pre-existing Environment Variable, you can tell Cake.Recipe the name of variable to use. However, you don't directly tell Cake.Recipe the value of the Environment Variable. So, for example, you could do this:

Environment.SetVariableNames(githubUserNameVariable: "MY_CUSTOM_GITHUB_ENVIRONMENT_VARIABLE", githubPasswordVariable: "MY_CUSTOM_GITHUB_PASSWORD_ENVIRONMENT_VARIABLE");

Where you could configure these locally here:

image

Hopefully that makes sense.

Now, after following these instructions:

https://cake-contrib.github.io/Cake.Recipe/docs/usage/creating-release

You would have these Enviroment Variables configured locally:

image

And after restarting your PowerShell Session (you always have to do this after editing your Environment Variables) you should be able to run:

.\build.ps1 -target releasenotes

And the releasenotes will be created. However, on that note...

As per the instructions that I linked to, all issues that are being assigned to the milestone (in your case, 0.2.0) need to be closed, in order for them to make their way into the release notes. Currently, this issue (#8) is still open, and therefore won't appear. If the work on this issue is complete, I would suggest closing the issue, or bumping the issue to another milestone.

With those things done, I think you should be in a position to continue with the release.

Please let me know if you have any questions.

@fwinkelbauer
Copy link
Contributor Author

Fixes #8

@gep13 Thanks, I'll try that!

@fwinkelbauer
Copy link
Contributor Author

fwinkelbauer commented May 3, 2017

@gep13 Alright, so I got around to test this. My initial approach regarding the environment variables was based on this. I've tried:

$env:GITHUB_USERNAME = "fwinkelbauer"
$env:GITHUB_PASSWORD = "..."
.\build.ps1 -targets releasenotes

This blew up with an Octokit exception, which is why I've came up with the Environment.SetVariables approach (which didn't work either, we've discussed this before). Your outlined alternative by configuring these variables using the Windows UI seems to work fine.

On more note regarding the recipe documentation: I spend like 15 minutes until I've figured out that the release notes draft (point 6) can actually be seen on GitHub. I should add that I'm a GitHub noob when it comes to using release notes, but this step was unexpected and confusing. I was searching the BuildArtifacts folder for some notes haha.

Can you actually see the release draft? I am wondering why it states that there is one commit which closed 5 issues in the 0.2.0 release. Did that happen because the milestone includes one pull request, or is it because the link between the issues and their respective pull requests is "wrong"?

@fwinkelbauer
Copy link
Contributor Author

@gep13 Oh and: the edit mask for the 0.2.0 release shows that this release is marked as a pre-release. Should I change that manually, or is that done in the Recipe publish process?

@gep13
Copy link
Member

gep13 commented May 3, 2017

@fwinkelbauer said...
by configuring these variables using the Windows UI seems to work fine.

Good stuff, glad to hear that this worked!

@fwinkelbauer said...
I spend like 15 minutes until I've figured out that the release notes draft (point 6) can actually be seen on GitHub

Fair point. I think we could expand the documentation in this area.

@fwinkelbauer said...
it states that there is one commit which closed 5 issues in the 0.2.0 release

Hmm, I am not entirely sure why it is saying that. It could be a bug with GitReleaseManager. It doesn't use commit messages etc to figure this out, but rather it counts the commits. I would need to dig into what is going on there within GitReleaseManager. You can manually change that in the release notes. Once you actually create the tag in the repo, this link will show you exactly how many commits there are.

@fwinkelbauer said...
Oh and: the edit mask for the 0.2.0 release shows that this release is marked as a pre-release. Should I change that manually, or is that done in the Recipe publish process?

Pre-Release is typically reserved when you are pushing out an alpha or beta release. In this case, you are putting out the 0.2.0 release. So the pre-release flag isn't required, so I would go ahead and change this manually. Looks like you might be running an older version of Cake.Recipe. I recently changed it so that it didn't set pre-release by default. If you delete the Cake.Recipe folder from your tools folder, adn run the build again, you will get the latest Cake.Recipe.

@fwinkelbauer
Copy link
Contributor Author

fwinkelbauer commented May 4, 2017

Two more (hopefully my last) questions:

  • Do I merge release/0.2.0 manually (no ff) or do I create pull requests to integrate into master and develop?
  • Can I do this even though the release branch is empty?

@gep13
Copy link
Member

gep13 commented May 4, 2017

Personally, unless you need a review, I would simply merge directly with git merge --no-ff release/0.2.0

When you haven't actually made any commits in the release branch, the merge into master will work, but when you try to merge to develop, it will tell you that there is nothing for it to do. After that, you can simply delete the release branch.

@fwinkelbauer
Copy link
Contributor Author

fwinkelbauer commented May 4, 2017

We did it! 🎉

Thank you!

@gep13
Copy link
Member

gep13 commented May 4, 2017

Woo hoo! This is great news! Well done!

@gep13
Copy link
Member

gep13 commented May 4, 2017

@fwinkelbauer said...
Thank you!

You are very welcome! Thank you for taking the time to create/maintain this addin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants