File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 </Target >
5959
6060 <Target Name =" WriteGitInfoFile" DependsOnTargets =" GenerateGitInfo" BeforeTargets =" BeforeBuild" >
61+ <PropertyGroup >
62+ <GitInfoText >
63+ // (auto-generated from .csproj)
64+ namespace Z2Randomizer;
6165
62- <PropertyGroup >
63- <GitInfoText >// (auto-generated from .csproj)
64- namespace Z2Randomizer;
65- public static class GitInfo {
66- public static partial string Commit = " $(GitHash)" ;
67- public static partial string Branch = " $(GitBranch)" ;
68- public static partial bool IsDirty = $(IsDirtyValue);
69- }
70- </GitInfoText >
71- </PropertyGroup >
66+ public static partial class GitInfo
67+ {
68+ static GitInfo()
69+ {
70+ Commit = "$(GitHash)";
71+ Branch = "$(GitBranch)";
72+ IsDirty = $(IsDirtyValue);
73+ }
74+ }
75+ </GitInfoText >
76+ </PropertyGroup >
7277
73- <WriteLinesToFile
74- File =" $(IntermediateOutputPath)GitInfo.cs"
75- Overwrite =" true"
76- Lines =" $([System.Text.RegularExpressions.Regex]::Split('$(GitInfoText)', '\n'))" />
78+ <WriteLinesToFile
79+ File =" $(IntermediateOutputPath)GitInfo.cs"
80+ Overwrite =" true"
81+ Lines =" $([System.Text.RegularExpressions.Regex]::Split('$(GitInfoText)', '\n'))" />
7782
78- <ItemGroup >
79- <Compile Include =" $(IntermediateOutputPath)GitInfo.cs" />
80- </ItemGroup >
83+ <ItemGroup >
84+ <Compile Include =" $(IntermediateOutputPath)GitInfo.cs" />
85+ </ItemGroup >
8186 </Target >
8287</Project >
Original file line number Diff line number Diff line change 22
33public static partial class GitInfo
44{
5- public static partial string Commit { get ; }
6- public static partial string Branch { get ; }
7- public static partial bool IsDirty { get ; }
5+ public static string Commit { get ; } = "n/a" ;
6+ public static string Branch { get ; } = "n/a" ;
7+ public static bool IsDirty { get ; }
88}
You can’t perform that action at this time.
0 commit comments