-
Notifications
You must be signed in to change notification settings - Fork 1
/
Directory.Build.props
executable file
·64 lines (50 loc) · 3.72 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
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0" encoding="UTF-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<VSVersion Condition="$(VSVersion) == ''">2022</VSVersion>
<BasePath>$(MSBuildThisFileDirectory)</BasePath>
<BasePath>$([System.IO.Path]::GetFullPath($(BasePath)))</BasePath>
<BuildPlatform Condition="$(BuildPlatform) == '' and $([MSBuild]::IsOSPlatform(linux))">Linux</BuildPlatform>
<BuildPlatform Condition="$(BuildPlatform) == '' and $([MSBuild]::IsOSPlatform(mac))">Mac</BuildPlatform>
<BuildPlatform Condition="$(BuildPlatform) == '' and $([MSBuild]::IsOSPlatform(windows))">Windows</BuildPlatform>
<ArtifactsDir Condition="$(BuildOutoutDir) == ''">$(BasePath)artifacts\</ArtifactsDir>
<BaseOutputPath Condition="$(BaseOutputPath) == ''">$(ArtifactsDir)$(MSBuildProjectName)\</BaseOutputPath>
<BaseIntermediateOutputPath Condition="$(BaseIntermediateOutputPath) == ''">$(ArtifactsDir)obj\$(BuildPlatform)\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<SourceDir Condition="$(SourceDir) == ''">$(BasePath)src\</SourceDir>
<NugetDir Condition="$(NugetDir) == ''">$(SourceDir)</NugetDir>
<PackageOutputPath>$(ArtifactsDir)nuget\$(Configuration)\</PackageOutputPath>
<BuildDir>$(MSBuildThisFileDirectory)</BuildDir>
<BaseOutputPath Condition="$(BaseOutputPath) == ''">$(BasePath)artifacts\</BaseOutputPath>
</PropertyGroup>
<PropertyGroup>
<DevVersion>2.7.5</DevVersion>
<Version Condition="$(Version) == ''">2.7.5.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>
<Company>Picoe Software Solutions</Company>
<Copyright>(c) 2010-2022 by Curtis Wensley</Copyright>
<PackageVersion>$(InformationalVersion)</PackageVersion>
<PackageLicenseFile>Eto-LICENSE.txt</PackageLicenseFile>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<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>
<PackageProjectUrl>https://github.com/picoe/Eto.DevExtensions</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
<!-- add git sha to informational version, after package version is set -->
<InformationalVersion Condition="$(GITHUB_SHA) != ''">$(InformationalVersion)+$(GITHUB_SHA)</InformationalVersion>
</PropertyGroup>
<ItemGroup>
<None Include="$(BasePath)LICENSE" PackageCopyToOutput="False" Pack="True" PackagePath="$(PackageLicenseFile)">
<Link>Eto-LICENSE.txt</Link>
</None>
</ItemGroup>
</Project>