-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.props
More file actions
48 lines (42 loc) · 1.76 KB
/
Copy pathversion.props
File metadata and controls
48 lines (42 loc) · 1.76 KB
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
42
43
44
45
46
47
48
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!--
MajorMinor is the only value you edit for a product-version bump.
Examples:
1.0 -> 1.1 for the next minor release
1.1 -> 2.0 for the next major release
-->
<MajorMinor>1.0</MajorMinor>
<!--
Prevent the .NET SDK from appending source-control metadata such as
+commit-hash to InformationalVersion. We want the displayed version to
stay in the custom form:
MajorMinor.YYDDD.HHMM
where:
YY = two-digit UTC year
DDD = three-digit UTC day-of-year
HHMM = UTC build time
-->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>
<!--
ComputeSharedVersion is used by standalone HyperVLauncher builds.
The WiX project computes SharedVersion locally in its own project file and
passes that exact value into the nested app build, so the MSI filename and
the app's InformationalVersion stay identical for installer builds.
We only compute SharedVersion here when it was not already supplied by an
outer build.
-->
<Target Name="ComputeSharedVersion"
BeforeTargets="PrepareForBuild"
Condition="'$(SharedVersion)' == ''">
<PropertyGroup>
<!-- UTC is used so date/time-based versions are stable regardless of
the local machine time zone. -->
<BuildYear>$([System.DateTime]::UtcNow.ToString("yy"))</BuildYear>
<BuildDayOfYear>$([System.String]::Format('{0:000}', $([System.DateTime]::UtcNow.DayOfYear)))</BuildDayOfYear>
<BuildTime>$([System.DateTime]::UtcNow.ToString("HHmm"))</BuildTime>
<SharedVersion>$(MajorMinor).$(BuildYear)$(BuildDayOfYear).$(BuildTime)</SharedVersion>
</PropertyGroup>
</Target>
</Project>