Merge branch 'release' into dev

This commit is contained in:
Pranav K 2016-05-06 13:28:51 -07:00
Родитель b566ba79a3 fc7d6c222c
Коммит 552166c854
4 изменённых файлов: 14 добавлений и 7 удалений

Просмотреть файл

@ -1 +1 @@
1.0.0-rc2-002673
1.0.0-rc2-002678

Просмотреть файл

@ -1 +1 @@
1.0.0-rc2-002673
1.0.0-rc2-002678

Просмотреть файл

@ -1 +1 @@
1.0.0-rc2-002673
1.0.0-rc2-002678

Просмотреть файл

@ -2,22 +2,29 @@ use namespace="System"
functions
@{
DateTime Start = new DateTime(2015, 1, 1);
string CreateDayBasedVersionNumber()
{
var start = new DateTime(2015, 1, 1);
var now = DateTime.UtcNow;
string version = "0";
// If the computer date is set before the start date, then the version is 0
if (now >= start)
if (now >= Start)
{
var yearsSinceStart = (now.Year - start.Year) + 1;
var yearsSinceStart = (now.Year - Start.Year) + 1;
version = yearsSinceStart + now.ToString("MMdd");
}
return version;
}
string CreateSecondBasedTimeStamp()
{
var seconds = (long)(DateTime.UtcNow - Start).TotalSeconds;
return seconds.ToString("x").PadLeft(9, (char)'0');
}
private bool _buildQualitySet;
private string _buildQuality;
@ -48,7 +55,7 @@ functions
var buildNumber = Environment.GetEnvironmentVariable("KOREBUILD_BUILD_NUMBER");
if (string.IsNullOrEmpty(buildNumber))
{
return "t" + DateTime.UtcNow.ToString("yyMMddHHmmss");
return "t" + CreateSecondBasedTimeStamp();
}
return !string.IsNullOrEmpty(BuildQuality) ? BuildQuality + "-" + buildNumber : buildNumber;