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

Use MSBuild property to determine base version instead of external file #113

Closed
mgnslndh opened this issue Apr 22, 2020 · 2 comments
Closed

Comments

@mgnslndh
Copy link

mgnslndh commented Apr 22, 2020

Is it possible to use an MSBuild property to determine base version instead of tag/branch or external file?

This seems to indicate that it is possible to set the $(GitBaseVersion) from MSBuild:
https://github.com/kzu/GitInfo/blob/master/src/GitInfo/build/GitInfo.targets#L78

I can't get it to work. Is it possible? When/Where should the variable be assigned?

@summer600
Copy link

Not sure whether my issue is like this. But i wanted to get the GitSha into minver as described in https://rehansaeed.com/the-easiest-way-to-version-nuget-packages/ and tried minver myself with gitinfo (which @rehan did not mention without success as mentioned in adamralph/minver#334

@kzu
Copy link
Member

kzu commented Sep 20, 2020

The behavior you're looking for is triggered when you set GitDefaultVersion, which is used in the default fallback if no other base version is determined. That other line is confusing, will remove it :)

kzu added a commit that referenced this issue Sep 20, 2020
@kzu kzu closed this as completed Sep 20, 2020
@devlooped devlooped locked and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants