forked from aguacongas/chatle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Env.shade
36 lines (31 loc) · 773 Bytes
/
Env.shade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use namespace="System"
functions
@{
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)
{
var yearsSinceStart = (now.Year - start.Year) + 1;
version = yearsSinceStart + now.ToString("MMdd");
}
return version;
}
string BuildNumber
{
get
{
return "rc1-" + DateTime.UtcNow.ToString("yyMMddHHmmss");
}
}
bool IsBuildV2
{
get
{
return Environment.GetEnvironmentVariable("KOREBUILD_BUILD_V2") == "1";
}
}
}