Skip to content

Commit ada01cf

Browse files
added commit hash embedding
1 parent cea8aed commit ada01cf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Xelmish.fsproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,15 @@
3535
<PrivateAssets>All</PrivateAssets>
3636
</PackageReference>
3737
</ItemGroup>
38+
39+
<Target Name="GetGitVersion" BeforeTargets="GenerateNuspec">
40+
<Exec Command="git rev-parse HEAD" ConsoleToMSBuild="true" IgnoreExitCode="true">
41+
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitHash" />
42+
</Exec>
43+
<PropertyGroup>
44+
<RepositoryCommit Condition="'$(GitCommitHash)' != ''">$(GitCommitHash)</RepositoryCommit>
45+
<RepositoryCommit Condition="'$(RepositoryCommit)' == ''">unknown</RepositoryCommit>
46+
</PropertyGroup>
47+
<Message Text="RepositoryCommit: $(RepositoryCommit)" Importance="high" />
48+
</Target>
3849
</Project>

0 commit comments

Comments
 (0)