actually, use the git hash for this for now

This commit is contained in:
goat 2022-12-10 11:48:54 +01:00
parent 2f4efe4e50
commit 1dd0d60e26
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -109,23 +109,20 @@
<ContentWithTargetPath Include="$(ProjectRuntimeConfigFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$(ProjectRuntimeConfigFileName)" /> <ContentWithTargetPath Include="$(ProjectRuntimeConfigFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$(ProjectRuntimeConfigFileName)" />
</ItemGroup> </ItemGroup>
</Target> </Target>
<Target Name="TempWriteAssemblyVersion" BeforeTargets="CoreCompile">
<PropertyGroup>
<TempAssemblyNameFile>$(OutputPath)TEMP_assver.txt</TempAssemblyNameFile>
</PropertyGroup>
<Exec Command="echo $(DalamudVersion) &gt; $(TempAssemblyNameFile)" />
</Target>
<Target Name="GetGitHash" BeforeTargets="WriteGitHash" Condition="'$(BuildHash)' == ''"> <Target Name="GetGitHash" BeforeTargets="WriteGitHash" Condition="'$(BuildHash)' == ''">
<PropertyGroup> <PropertyGroup>
<!-- temp file for the git version (lives in "obj" folder)--> <!-- temp file for the git version (lives in "obj" folder)-->
<VerFile>$(IntermediateOutputPath)gitver</VerFile> <VerFile>$(IntermediateOutputPath)gitver</VerFile>
<VerFileClientStructs>$(IntermediateOutputPath)csver</VerFileClientStructs> <VerFileClientStructs>$(IntermediateOutputPath)csver</VerFileClientStructs>
<TempVerFile>$(OutputPath)TEMP_gitver.txt</TempVerFile>
</PropertyGroup> </PropertyGroup>
<!-- write the hash to the temp file.--> <!-- write the hash to the temp file.-->
<Exec Command="git -C &quot;$(ProjectDir.Replace('\','\\'))&quot; describe --long --always --dirty &gt; $(VerFile)" /> <Exec Command="git -C &quot;$(ProjectDir.Replace('\','\\'))&quot; describe --long --always --dirty &gt; $(VerFile)" />
<Exec Command="git -C &quot;$(ProjectDir.Replace('\','\\'))\..\lib\FFXIVClientStructs&quot; describe --long --always --dirty &gt; $(VerFileClientStructs)" /> <Exec Command="git -C &quot;$(ProjectDir.Replace('\','\\'))\..\lib\FFXIVClientStructs&quot; describe --long --always --dirty &gt; $(VerFileClientStructs)" />
<Exec Command="type $(VerFile) &gt; $(TempVerFile)" />
<!-- read the version into the GitVersion itemGroup--> <!-- read the version into the GitVersion itemGroup-->
<ReadLinesFromFile File="$(VerFile)"> <ReadLinesFromFile File="$(VerFile)">
<Output TaskParameter="Lines" ItemName="GitVersion" /> <Output TaskParameter="Lines" ItemName="GitVersion" />