Fix a mistake preventing the revision field from being filled. Also record the sha1 of the head revision.

This commit is contained in:
Will
2016-03-18 01:40:32 -06:00
parent 458c535809
commit 4641f37c1f
2 changed files with 7 additions and 2 deletions

View File

@@ -97,12 +97,15 @@ cd..
git rev-list --all --count >> version.txt
set /p revision= < version.txt
del /Q version.txt
cd Source\Util
cd..
set /p head= < .git/refs/heads/master
cd LibBSP\Source\Util
del /Q Revision.cs
type nul> Revision.cs
echo namespace LibBSP {>> Revision.cs
echo public class Revision {>> Revision.cs
echo public const string version = "r%25version%25";>> Revision.cs
echo public const string version = "%25revision%25";>> Revision.cs
echo public const string head = "%25head%25";>> Revision.cs
echo }>> Revision.cs
echo }&gt;&gt; Revision.cs</PreBuildEvent>
</PropertyGroup>
@@ -115,6 +118,7 @@ type nul&gt; Revision.cs
echo namespace LibBSP {&gt;&gt; Revision.cs
echo public class Revision {&gt;&gt; Revision.cs
echo public const string version = "To be replaced on build";&gt;&gt; Revision.cs
echo public const string head = "To be replaced on build";&gt;&gt; Revision.cs
echo }&gt;&gt; Revision.cs
echo }&gt;&gt; Revision.cs</PostBuildEvent>
</PropertyGroup>

View File

@@ -1,5 +1,6 @@
namespace LibBSP {
public class Revision {
public const string version = "To be replaced on build";
public const string head = "To be replaced on build";
}
}