Skip to content

Commit

Permalink
Fixed bug where the git information is not properly obtained and the …
Browse files Browse the repository at this point in the history
…head information was not properly dumped to the right file name.

Signed-off-by: AraHaan <seandhunt_7@yahoo.com>
  • Loading branch information
AraHaan committed Jan 1, 2022
1 parent bf0ee0f commit de25f59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions build/GitBuildInfo.SourceGenerator.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
WorkingDirectory="$(MSBuildProjectDirectory)"
ConsoleToMSBuild="true"
IgnoreExitCode="true"
Condition="'$(GitHead)' == ''">
Condition="'$(CommitHash)' == ''">
<Output TaskParameter="ConsoleOutput" PropertyName="CommitHash" />
</Exec>
<Exec
Command="git name-rev --name-only HEAD"
WorkingDirectory="$(MSBuildProjectDirectory)"
ConsoleToMSBuild="true"
IgnoreExitCode="true"
Condition="'$(GitHead)' == ''">
Condition="'$(GitBranch)' == ''">
<Output TaskParameter="ConsoleOutput" PropertyName="GitBranch" />
</Exec>
<WriteLinesToFile
File="$(IntermediateOutputPath)\githead.txt"
File="$(IntermediateOutputPath)\git_head.txt"
Lines="$(GitHead)"
Condition="'$(GitHead)' != ''"
Overwrite="true"
Expand Down
6 changes: 2 additions & 4 deletions src/GitBuildInfo.SourceGenerator/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
<Version>1.0.14</Version>
<PackageReleaseNotes>
Removed MSBuild task assembly and replaced them when msbuild execute commands to grab the needed data and output them to intermediate files for the generator to use.
</PackageReleaseNotes>
<Version>1.0.15</Version>
<PackageReleaseNotes>Fixed bug where the git information is not properly obtained and the head information was not properly dumped to the right file name.</PackageReleaseNotes>
<Copyright>Copyright (c) 2021</Copyright>
<!-- Suppresses the warnings about the package not having assemblies in lib/*/.dll.-->
<NoPackageAnalysis>true</NoPackageAnalysis>
Expand Down

0 comments on commit de25f59

Please sign in to comment.