-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust AssemblyInformationalVersion after NBGV: no metadata in public…
… versions
- Loading branch information
Showing
3 changed files
with
26 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/Buildvana.Sdk/Modules/NerdbankGitVersioning/Module.Core.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project> | ||
|
||
<ItemGroup Condition="$(UseNerdbankGitVersioning)"> | ||
<BV_PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
<Target Name="BV_AdjustAssemblyInformationalVersion" | ||
AfterTargets="GetBuildVersion"> | ||
|
||
<!-- | ||
NpmPackageVersion is a SemVer2 version that has no Git commit metadata in public builds. | ||
https://github.com/dotnet/Nerdbank.GitVersioning/blob/v3.6.133/src/NerdBank.GitVersioning/VersionOracle.cs#L379 | ||
This is the value we want for AssemblyInformationalVersion. | ||
--> | ||
<PropertyGroup> | ||
<AssemblyInformationalVersion>$(NpmPackageVersion)</AssemblyInformationalVersion> | ||
</PropertyGroup> | ||
|
||
</Target> | ||
|
||
</Project> |
10 changes: 2 additions & 8 deletions
10
src/Buildvana.Sdk/Modules/NerdbankGitVersioning/Module.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters