-
Notifications
You must be signed in to change notification settings - Fork 0
/
Licensing.props
36 lines (29 loc) · 1.87 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
<Project ToolsVersion="15.0">
<!-- 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. -->
<PropertyGroup>
<!-- TODO: TBD: rethink the target paths... ensure they land in each of the projects. -->
<!-- TODO: TBD: also rethink the orientation, "desired" or "source/destination". -->
<_SourceLicenseFileDirectory>..\..\</_SourceLicenseFileDirectory>
<_SourceLicenseFileName>LICENSE.</_SourceLicenseFileName>
<DestinationLicenseFileName>LICENSE.txt</DestinationLicenseFileName>
<_SourceLicenseFilePath>$(_SourceLicenseFileDirectory)$(_SourceLicenseFileName)</_SourceLicenseFilePath>
<_DestinationLicenseFilePath>$(DestinationLicenseFileName)</_DestinationLicenseFilePath>
</PropertyGroup>
<!-- TODO: TBD: specify one or the other, the LICENSE file is preferred, we think. -->
<PropertyGroup>
<PackageLicenseFile>$(DestinationLicenseFileName)</PackageLicenseFile>
</PropertyGroup>
<PropertyGroup>
<!-- TODO: TBD: https://docs.microsoft.com/en-us/dotnet/core/tools/csproj -->
<PackageLicenseExpression Condition="!Exists('$(_DestinationLicenseFilePath)')">GPL-3.0-only</PackageLicenseExpression>
</PropertyGroup>
<ItemGroup>
<None Include="$(_DestinationLicenseFilePath)" Pack="true" PackagePath=".">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="CopyLicenseFileForPackagingPurposes" BeforeTargets="BeforeBuild" Condition="!Exists('$(_DestinationLicenseFilePath)')">
<Copy SourceFiles="$(_SourceLicenseFilePath)" DestinationFiles="$(_DestinationLicenseFilePath)" SkipUnchangedFiles="true" />
</Target>
</Project>