mirror of
https://github.com/celisej567/LibBSP.git
synced 2025-12-31 13:48:15 +03:00
Add build timestamp to Revision.cs.
This commit is contained in:
@@ -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 }>> Revision.cs</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user