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

Add GitVersionHelper (take 2) #1319

Merged
merged 2 commits into from
Aug 9, 2016
Merged

Add GitVersionHelper (take 2) #1319

merged 2 commits into from
Aug 9, 2016

Conversation

trondd
Copy link
Contributor

@trondd trondd commented Jul 21, 2016

Re-implemented with Newtonsoft.Json. Hopefully no trouble this time.



let GitVersion () =
let dirs = [ (environVar "ProgramData") @@ "chocolatey" @@ "bin" ]
Copy link
Member

Choose a reason for hiding this comment

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

is that the most common place?

Copy link
Contributor

Choose a reason for hiding this comment

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

Gitversion does suggest using chocolatey to install the exe, but I think a more resilient way to find the path to the chocolatey install directory is using the environment variable ChocolateyInstall. Then we can add bin to that and get the install dir.

@trondd
Copy link
Contributor Author

trondd commented Jul 31, 2016

Sorry for the delay, but vacation came in the way.

  1. I'll replace ProgramData with ChocolateyInstall as suggested.
  2. Is there a convenient way to find the packages folder?

It might make sense to add a GitVersionParams type to support other install locations, but I am nut sure how important that is.

@trondd
Copy link
Contributor Author

trondd commented Aug 3, 2016

Btw, this now works on Mac as well with the NuGet version of GitVersion

@forki forki merged commit ca4b512 into fsprojects:master Aug 9, 2016
@forki
Copy link
Member

forki commented Aug 9, 2016

great!

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.

3 participants