/
Calamari.csproj
119 lines (119 loc) · 6.46 KB
/
Calamari.csproj
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.0.0.0</Version>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>Calamari</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Calamari</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<PackageProjectUrl>https://github.com/OctopusDeploy/Calamari</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/OctopusDeploy/Calamari/blob/master/LICENSE.txt</PackageLicenseUrl>
<Authors>Octopus Deploy</Authors>
<Copyright>Octopus Deploy Pty Ltd</Copyright>
<PackageTags>tool</PackageTags>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/OctopusDeploy/Calamari/</RepositoryUrl>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Description>Contains the command-line Calamari tool that is used by Tentacle to perform depoyment actions on machines.</Description>
<Product>Calamari</Product>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;linux-arm</RuntimeIdentifiers>
<ApplicationManifest>Calamari.exe.manifest</ApplicationManifest>
<TargetFrameworks>netcoreapp3.1;net462</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net462' ">
<DefineConstants>$(DefineConstants);USE_NUGET_V2_LIBS;IIS_SUPPORT;USE_OCTODIFF_EXE;WINDOWS_CERTIFICATE_STORE_SUPPORT;USE_ALPHAFS_FOR_LONG_FILE_PATH_SUPPORT;HAS_SSL3</DefineConstants>
<PlatformTarget>anycpu</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">
<DefineConstants>$(DefineConstants);USE_OCTOPUS_XMLT;USE_SYSTEM_IO_DIRECTORY;USE_NUGET_V3_LIBS;WORKAROUND_FOR_EMPTY_STRING_BUG</DefineConstants>
</PropertyGroup>
<!--
The net452 build is the one that pulls in the AWS and Azure extensions. We treat
this build as the "Cloud" build.
-->
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<ProjectReference Include="..\Calamari.Aws\Calamari.Aws.csproj" />
<ProjectReference Include="..\Calamari.Azure\Calamari.Azure.csproj" />
<ProjectReference Include="..\Calamari.Terraform\Calamari.Terraform.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">
<ProjectReference Include="..\Calamari.Terraform\Calamari.Terraform.csproj" />
<ProjectReference Include="..\Calamari.Aws\Calamari.Aws.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="YamlDotNet" Version="6.1.2" />
<ProjectReference Include="..\Calamari.Shared\Calamari.Shared.csproj" />
<PackageReference Include="Octodiff" Version="1.1.2" />
<PackageReference Include="FSharp.Compiler.Tools" Version="4.0.0.1" />
<PackageReference Include="Octopus.Versioning" Version="4.1.3" />
<PackageReference Include="scriptcs" Version="0.17.1" />
<PackageReference Include="SharpCompress" Version="0.15.2" />
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Net" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Reference Include="System" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.2' OR '$(TargetFramework)' == 'net462' ">
<PackageReference Include="Autofac" Version="4.8.0" />
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net40'">
<PackageReference Include="Autofac" Version="3.5.2" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Kubernetes\Scripts\KubectlBashContext.sh" />
<EmbeddedResource Include="Kubernetes\Scripts\KubectlPowershellContext.ps1" />
<EmbeddedResource Include="Scripts\**" />
<None Update="Calamari.exe.manifest">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<!--
In netcore 2.1.3, the framework stopped calculating package definitions automatically "for perf"
(see https://github.com/dotnet/sdk/issues/2342)
So, we need to add a dependency onto `GetToolFiles` to calculate them first.
Unfortunately, RunResolvePackageDependencies doesn't exist for the full fat framework, so we
define a new empty target if it's not already defined to keep it happy.
-->
<Target Name="RunResolvePackageDependencies" Condition="'$(RunResolvePackageDependencies)' != ''" />
<Target Name="GetToolFiles" DependsOnTargets="RunResolvePackageDependencies">
<CreateItem Include="@(PackageDefinitions)" Condition="'%(Name)' == 'FSharp.Compiler.Tools'">
<Output TaskParameter="Include" ItemName="FSharpCompilerToolsRef" />
</CreateItem>
<CreateItem Include="@(PackageDefinitions)" Condition="'%(Name)' == 'ScriptCS'">
<Output TaskParameter="Include" ItemName="ScriptCSRef" />
</CreateItem>
<PropertyGroup>
<FSharpCompilerTools>@(FSharpCompilerToolsRef->'%(ResolvedPath)')/tools/*.*</FSharpCompilerTools>
<ScriptCS>@(ScriptCSRef->'%(ResolvedPath)')/tools/*.*</ScriptCS>
</PropertyGroup>
<ItemGroup>
<FSharpFiles Include="$(FSharpCompilerTools)" />
<ScriptCSFiles Include="$(ScriptCS)" />
</ItemGroup>
</Target>
<Target Name="CopyToolsAfterBuild" AfterTargets="Build" DependsOnTargets="GetToolFiles">
<Copy SourceFiles="@(FSharpFiles)" DestinationFolder="$(OutDir)/FSharp/" />
<Copy SourceFiles="@(ScriptCSFiles)" DestinationFolder="$(OutDir)/ScriptCS/" />
</Target>
<Target Name="CopyToolsAfterPublish" AfterTargets="Publish" DependsOnTargets="GetToolFiles">
<Copy SourceFiles="@(FSharpFiles)" DestinationFolder="$(PublishDir)/FSharp/" />
<Copy SourceFiles="@(ScriptCSFiles)" DestinationFolder="$(PublishDir)/ScriptCS/" />
</Target>
</Project>