forked from TimeWarpEngineering/timewarp-state
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.props
63 lines (59 loc) · 3.37 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
<Project>
<!-- Set common properties regarding assembly information and nuget packages -->
<PropertyGroup>
<Authors>Steven T. Cramer</Authors>
<Product>Blazor State</Product>
<PackageVersion>11.0.0-beta.31+8.0.202</PackageVersion>
<PackageProjectUrl>https://timewarpengineering.github.io/blazor-state/</PackageProjectUrl>
<PackageTags>TimeWarp-State; TimeWarpState; BlazorState; Blazor; State; Blazor-State; MediatR; Mediator; Pipeline; Redux; Flux</PackageTags>
<PackageIcon>Logo.png</PackageIcon>
<RepositoryUrl>https://github.com/TimeWarpEngineering/blazor-state.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageLicenseExpression>Unlicense</PackageLicenseExpression>
<PackageReleaseNotes>https://timewarpengineering.github.io/blazor-state/Overview.html</PackageReleaseNotes>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<!-- Deterministic Builds https://devblogs.microsoft.com/dotnet/producing-packages-with-source-link/#deterministic-builds -->
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<!-- Common compile parameters -->
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<NoWarn>CS7035;NU1503;1503</NoWarn>
<Nullable>disable</Nullable>
<TargetFramework>net8.0</TargetFramework>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<!--This is to add the CommitDate and CommitHash to your assemblyinfo -->
<Target Name="SetAssemblyMetaData" BeforeTargets="PreBuildEvent" Condition="'$(NCrunch)' != '1'">
<Exec Command="git log -1 --format=%%ct" ConsoleToMSBuild="true" Condition="'$(OS)' == 'Windows_NT'">
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitTimestamp"/>
</Exec>
<Exec Command="git log -1 --format=%ct" ConsoleToMSBuild="true" Condition="'$(OS)' != 'Windows_NT'">
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitTimestamp"/>
</Exec>
<Exec Command="pwsh -ExecutionPolicy Bypass -NoProfile -File "$(MSBuildThisFileDirectory)ConvertTimestamp.ps1" -GitCommitTimestamp $(GitCommitTimestamp)" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="CommitDate"/>
</Exec>
<PropertyGroup>
<!-- In Visual Studio the below line crashes if they fix VS then we can use this and no need for the powershell script -->
<!--<LastCommitDate>$([System.DateTime]::UnixEpoch.AddSeconds($(GitCommitTimestamp)).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssK"))</LastCommitDate>-->
</PropertyGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
<_Parameter1>CommitDate</_Parameter1>
<_Parameter2>$(LastCommitDate)</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
<!-- <Message Importance="high" Text="OS: $(OS)" />-->
<!-- <Message Importance="high" Text="CommitDate: $(LastCommitDate)" />-->
</Target>
</Project>