-
Notifications
You must be signed in to change notification settings - Fork 39
/
Directory.Build.props
53 lines (44 loc) · 3.06 KB
/
Directory.Build.props
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
49
50
51
52
53
<?xml version="1.0" encoding="UTF-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BasePath>$(MSBuildThisFileDirectory)</BasePath>
<SourceDir Condition="$(SourceDir) == ''">$(BasePath)\src\</SourceDir>
<ArtifactsDir>$(BasePath)\artifacts\</ArtifactsDir>
<BaseIntermediateOutputPath>$(ArtifactsDir)obj\$(OS)\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<BaseOutputPath>$(ArtifactsDir)bin\$(MSBuildProjectName)\</BaseOutputPath>
<PackageOutputPath>$(ArtifactsDir)nuget\$(Configuration)\</PackageOutputPath>
<!-- RestoreProjectStyle will be supported in VS for Mac 7.4 -->
<RestoreProjectStyle Condition="'$(RestoreProjectStyle)' == '' AND $(UsePackagesConfig) != 'True'">PackageReference</RestoreProjectStyle>
</PropertyGroup>
<PropertyGroup>
<DevVersion>0.26.0</DevVersion>
<Version Condition="$(Version) == ''">$(DevVersion).0</Version>
<InformationalVersion Condition="$(SetVersion) != ''">$(SetVersion)</InformationalVersion>
<!-- set version from tag -->
<InformationalVersion Condition="$(InformationalVersion) == '' AND $(BuildBranch.StartsWith('refs/tags/'))">$(BuildBranch.Substring(10))</InformationalVersion>
<!-- set version for CI build -->
<InformationalVersion Condition="$(InformationalVersion) == '' AND $(BuildVersion) != ''">$(DevVersion)-ci-$([System.DateTime]::Now.ToString('yyyyMMdd')).$(BuildVersion)</InformationalVersion>
<!-- set version for development -->
<InformationalVersion Condition="$(InformationalVersion) == ''">$(DevVersion)-dev</InformationalVersion>
<AssemblyVersionMajorMinor>$([System.Version]::Parse($([System.String]::Copy('$(Version)').Replace('.*', ''))).ToString(2))</AssemblyVersionMajorMinor>
<DaysSince2000>$([System.DateTime]::Today.Subtract($([System.DateTime]::Parse('2000-01-01T00:00:00Z'))).TotalDays.ToString('0'))</DaysSince2000>
<SecondsOfTodayHalved>$([MSBuild]::Divide($([System.DateTime]::Now.Subtract($([System.DateTime]::Today)).TotalSeconds), 2).ToString('0'))</SecondsOfTodayHalved>
<FileVersion>$(AssemblyVersionMajorMinor).$(DaysSince2000).$(SecondsOfTodayHalved)</FileVersion>
</PropertyGroup>
<PropertyGroup>
<Company>Mono development team</Company>
<Copyright>(c) Various Mono authors</Copyright>
<PackageVersion>$(InformationalVersion)</PackageVersion>
<PackageLicenseFile>Portable.Xaml-LICENSE.txt</PackageLicenseFile>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/cwensley/Portable.Xaml</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<None Include="$(BasePath)LICENSE.txt" PackageCopyToOutput="False" Pack="True" PackagePath="$(PackageLicenseFile)">
<Link>Portable.Xaml-LICENSE.txt</Link>
</None>
</ItemGroup>
<Import Condition="Exists('$(MSBuildThisFileDirectory)..\Portable.Xaml.Common.props')" Project="$(MSBuildThisFileDirectory)..\Portable.Xaml.Common.props" />
</Project>