This repository has been archived by the owner on Dec 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Licensing.props
51 lines (42 loc) · 2.38 KB
/
Licensing.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
<Project ToolsVersion="15.0">
<PropertyGroup>
<!--<PackageLicenseUrl>https://github.com/mwpowellhtx/Kingdom.OrTools/blob/master/LICENSE</PackageLicenseUrl>-->
</PropertyGroup>
<!-- This is a kluge workaround to a failure on Microsoft's part to properly execute on the licensing migration path.
This does package the LICENSE file, but it also leaves a `deprecateLicenseUrl´ artifact in the package `nuspec´ file. -->
<!-- ReSharper disable UnknownProperty -->
<PropertyGroup>
<_LicenseFileDirectory>..\..\</_LicenseFileDirectory>
<_DesiredLicenseFileName>LICENSE.</_DesiredLicenseFileName>
<_InternalLicenseFileName>LICENSE.txt</_InternalLicenseFileName>
<_DesiredFilePath>$(_LicenseFileDirectory)$(_DesiredLicenseFileName)</_DesiredFilePath>
<_LicenseFilePath>$(_LicenseFileDirectory)$(_InternalLicenseFileName)</_LicenseFilePath>
</PropertyGroup>
<!-- ReSharper restore UnknownProperty -->
<!-- TODO: TBD: specify one or the other, the LICENSE file is preferred, we think. -->
<!-- ReSharper disable UnknownProperty -->
<PropertyGroup>
<PackageLicenseFile>$(_InternalLicenseFileName)</PackageLicenseFile>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
</PropertyGroup>
<!-- ReSharper restore UnknownProperty -->
<PropertyGroup>
<!--<PackageLicenseExpression Condition="!Exists('$(_LicenseFilePath)')">GPL-3.0-only</PackageLicenseExpression>-->
</PropertyGroup>
<!-- ReSharper disable UnknownProperty -->
<ItemGroup>
<None Include="$(_LicenseFilePath)" Pack="true" PackagePath="$(_InternalLicenseFileName)">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<!-- ReSharper restore UnknownProperty -->
<!-- ReSharper disable UnknownProperty -->
<Target Name="NotifyExistingLicenseFile" BeforeTargets="BeforeBuild" Condition="Exists('$(_LicenseFilePath)')">
<Message Text="License file `$(_LicenseFilePath)´ already exists, bypassing copy operation." Importance="high" />
</Target>
<Target Name="CopyLicenseFileForPackagingPurposes" BeforeTargets="BeforeBuild" Condition="!Exists('$(_LicenseFilePath)')">
<Message Text="Copying license file `$(_DesiredFilePath)´ to `$(_LicenseFilePath)´." Importance="high" />
<Copy SourceFiles="$(_DesiredFilePath)" DestinationFiles="$(_LicenseFilePath)" />
</Target>
<!-- ReSharper restore UnknownProperty -->
</Project>