-
Notifications
You must be signed in to change notification settings - Fork 2
/
Directory.Build.targets
28 lines (26 loc) · 1.15 KB
/
Directory.Build.targets
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
<!--
https://github.com/dotnet/project-system/issues/4353
Before build Directory.Build.props
After build Directory.Builds.targets
-->
<Project>
<PropertyGroup>
<CompleteName>$(Authors).$(AssemblyName)</CompleteName>
<Title>$(CompleteName)</Title>
<PackageId>$(CompleteName)</PackageId>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
</PropertyGroup>
<!--you are a fucking genious https://github.com/dotnet/project-system/issues/1457#issuecomment-893677846-->
<Target Name="SetVersion" BeforeTargets="Build">
<PropertyGroup>
<!-- on build.props so they can be overriden per-projects but not enforced
<MajorVersion>0</MajorVersion>
<MinorVersion>0</MinorVersion>
-->
<PatchVersion>$([System.DateTime]::UtcNow.ToString("yyMMdd"))</PatchVersion>
<!--<BuildVersion Condition="'$(DesignTimeBuild)' != 'true' OR '$(BuildingProject)' == 'true'">$([System.DateTime]::UtcNow.ToString("HHmmss"))</BuildVersion>-->
<BuildVersion>$([System.DateTime]::UtcNow.ToString("HHmmss"))-alpha</BuildVersion>
<PackageVersion>$(MajorVersion).$(MinorVersion).$(PatchVersion).$(BuildVersion)</PackageVersion>
</PropertyGroup>
</Target>
</Project>