-
Notifications
You must be signed in to change notification settings - Fork 2
/
AutoVersionIncrement.tt
41 lines (36 loc) · 1.16 KB
/
AutoVersionIncrement.tt
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
37
38
39
40
41
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ output extension=".cs" #>
// This code was automatically generated. Do not make any manual changes to it.
using System.Reflection;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
[assembly: AssemblyVersion("1.1.<#= this.BuildNumber #>.<#= this.RevisionNumber #>")]
[assembly: AssemblyFileVersion("1.1.<#= this.BuildNumber #>.<#= this.RevisionNumber #>")]
<#+
// Days that have passed since Jan 1, 2023 00:00:00
int BuildNumber = (int)(DateTime.UtcNow - new DateTime(
2023,
1,
1,
0,
0,
0)
).TotalDays;
// Minutes that have passed since today 00:00:00
int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(
(DateTime.UtcNow.Year),
(DateTime.UtcNow.Month),
(DateTime.UtcNow.Day),
0,
0,
0)
).TotalMinutes;
#>