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

GetVersion target does not update RepositoryBranch nor RepositoryCommit #1921

Closed
dittodhole opened this issue Nov 19, 2019 · 2 comments
Closed
Milestone

Comments

@dittodhole
Copy link

This is an idea, to enhance stamping nuget packages created by sdk projects:
One could update the RepositoryBranch and RepositoryCommit msbuild properties accordingly in

<PropertyGroup Condition=" '$(UpdateVersionProperties)' == 'true' ">

My current workaround is as follows (somewhere in your .csproj-file):

<Target Name="UpdateRepositoryBranch" BeforeTargets="GenerateNuspec">
  <PropertyGroup>
    <RepositoryBranch>$(GitVersion_BranchName)</RepositoryBranch>
  </PropertyGroup>
</Target>
<Target Name="UpdateRepositoryCommit" BeforeTargets="GenerateNuspec">
  <PropertyGroup>
    <RepositoryCommit>$(GitVersion_Sha)</RepositoryCommit>
  </PropertyGroup>
</Target>
@dittodhole
Copy link
Author

dittodhole commented Nov 19, 2019

see #1922

@arturcic arturcic added this to the 5.1.3 milestone Nov 20, 2019
@dittodhole
Copy link
Author

see #1936

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

2 participants