[Build] Set revision to 0 outside source control

This ensures that properly built packages take precedence to incorrectly
built packages.
This commit is contained in:
thefiddler 2014-03-18 14:28:52 +01:00
parent db913ca3f4
commit a24e1edeae

View file

@ -114,7 +114,7 @@ namespace Build.UpdateVersion
static string RetrieveRevisionNumber(DateTime now) static string RetrieveRevisionNumber(DateTime now)
{ {
double timespan = now.Subtract(new DateTime(2010, 1, 1)).TotalDays; double timespan = now.Subtract(new DateTime(2010, 1, 1)).TotalDays;
string revision = RetrieveGitRevision() ?? RetrieveSvnRevision() ?? RetrieveBzrRevision() ?? RetrieveSeconds(timespan); string revision = RetrieveGitRevision() ?? RetrieveSvnRevision() ?? RetrieveBzrRevision() ?? "0";
revision = revision.Trim(); revision = revision.Trim();
return revision; return revision;
} }