Add build timestamp to Revision.cs.

This commit is contained in:
Will
2019-04-20 00:16:25 -06:00
parent bd0a1056f2
commit 50199b5d36
2 changed files with 8 additions and 0 deletions

View File

@@ -106,6 +106,12 @@ cd..
git rev-parse HEAD >> head.txt
set /p head= < head.txt
del /Q head.txt
FOR /F "tokens=* USEBACKQ" %25%25F IN (`date /t`) DO (
SET date=%25%25F
)
FOR /F "tokens=* USEBACKQ" %25%25G IN (`time /t`) DO (
SET time=%25%25G
)
cd LibBSP\Source\Util
del /Q Revision.cs
type nul> Revision.cs
@@ -118,6 +124,7 @@ echo public const string configuration = "Debug";>> Revision.cs
echo #else>> Revision.cs
echo public const string configuration = "Release";>> Revision.cs
echo #endif>> Revision.cs
echo public const string dateTime = "%25date%25 %25time%25";>> Revision.cs
echo }>> Revision.cs
echo }&gt;&gt; Revision.cs</PreBuildEvent>
</PropertyGroup>

View File

@@ -3,5 +3,6 @@ namespace LibBSP {
public const string version = "To be replaced on build";
public const string head = "To be replaced on build";
public const string configuration = "To be replaced on build";
public const string dateTime = "To be replaced on build";
}
}