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

Allow project defined GitVersionOutputFile. #2844

Closed
hubuk opened this issue Sep 9, 2021 · 2 comments
Closed

Allow project defined GitVersionOutputFile. #2844

hubuk opened this issue Sep 9, 2021 · 2 comments
Milestone

Comments

@hubuk
Copy link
Contributor

hubuk commented Sep 9, 2021

I would like to make GitVersion create gitversion.json file in different location that the default one $([MSBuild]::EnsureTrailingSlash($(BaseIntermediateOutputPath)))gitversion.json.
One of the simplest ways of doing this is by defining value for this property in Directory.Build.props file.
The problem is that GitVersion.MsBuild.props does not allow default value.

Detailed Description

A value for GitVersionOutputFile property in GitVersion.MsBuild.props should be set only if the property does not have a value assigned already.

Context

I would like to use gitversion.json file in FrontEnd project which due to some external requirements expects source file to be located in particular location. I would like to change the default location.

Possible Implementation

<GitVersionOutputFile Condition="'$(GitVersionOutputFile)' == ''">$([MSBuild]::EnsureTrailingSlash($(BaseIntermediateOutputPath)))gitversion.json</GitVersionOutputFile>

Condition attribute defined as above should be sufficient. I can prepare a PR if the requested improvement is acceptable by maintainers 😊

@arturcic
Copy link
Member

arturcic commented Sep 9, 2021

Honestly I'm not against, it might provide more flexibility. Go for it

@asbjornu asbjornu added this to the 5.x milestone Sep 10, 2021
@arturcic arturcic modified the milestones: 5.x, 5.8.0 Oct 3, 2021
@github-actions
Copy link

🎉 This issue has been resolved in version 5.8.0 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

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

No branches or pull requests

3 participants