-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
103 lines (100 loc) · 9.04 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
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
<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<!-- We need to mark the sfxproj files as packaging projects to avoid changing their output directories. -->
<IsPackageProject Condition="'$(MSBuildProjectExtension)' == '.sfxproj' OR '$(MSBuildProjectExtension)' == '.bundleproj' OR '$(MSBuildProjectName)' == 'installers.csproj'">true</IsPackageProject>
<IsPackageProject Condition="'$(MSBuildProjectExtension)' != '.sfxproj' AND '$(MSBuildProjectExtension)' != '.bundleproj'">false</IsPackageProject>
<RepoRoot Condition="'$(IsPackageProject)' == 'true'">$(MSBuildThisFileDirectory)</RepoRoot>
<!-- Mark the nuget packages as serviceable. -->
<Serviceable>true</Serviceable>
<!-- suppress message when using the .NET Preview SDKs. -->
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<ElskomSdkDisableImplicitFrameworkReference>true</ElskomSdkDisableImplicitFrameworkReference>
<ElskomSdkDevBuild>true</ElskomSdkDevBuild>
<!--
Sorry, we have to disable the warning for adding the reference assemblies to the package without adding them to the nuspec.
This is because of the fact that if we use the methods to add them that does add them to the nuspec, then the folder paths
would be added automatically to the project which is not intended at all or even wanted. As such for now the only way to
fix that is to disable package analysis for now.
-->
<NoPackageAnalysis Condition="'$(PublishReferenceAssemblies)' == 'true'">true</NoPackageAnalysis>
<Nullable>enable</Nullable>
<ElskomOrgName>Els_kom org.</ElskomOrgName>
<Company>$(ElskomOrgName)</Company>
<Authors>$(ElskomOrgName)</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Elskom/runtime/</PackageProjectUrl>
<RepositoryUrl>https://github.com/Elskom/runtime/</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<CopyrightElskom>Copyright (c) 2018-2024</CopyrightElskom>
<Copyright Condition="'$(IsPackageProject)' == 'false'">$(CopyrightElskom)</Copyright>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true' AND '$(IsPackageProject)' == 'false'">true</ContinuousIntegrationBuild>
<IsTagBuild Condition="$(GITHUB_REF.StartsWith('refs/tags/'))">true</IsTagBuild>
<RootNamespace Condition="'$(RootNamespace)' == ''">Elskom.Generic.Libs</RootNamespace>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Elskom.snk</AssemblyOriginatorKeyFile>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<!-- <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>SourceGenerated</CompilerGeneratedFilesOutputPath> -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<SnkPublicKey Condition="'$(IsPackageProject)' == 'false' AND '$(ProduceOnlyReferenceAssembly)' == ''">0024000004800000940000000602000000240000525341310004000001000100bd92841e5ad5805edc6b90c3102ae676cc9a694e2c16cf827fa0fbd36fc3ec7aca9475b0d32f8b574aa01f2fffcdc3c92684531ddf215a76d5878fb433ab41c3b4ac7c96c86c87eb4dc71646ec00880fdecd576ccbbe92c3093de976e8e30af00e14df9ca1458cafa5f71dee161394c5bb9904b8075c75229812c457bcc745d5</SnkPublicKey>
<BaseIntermediateOutputPath Condition="'$(IsPackageProject)' == 'false' AND '$(ProduceOnlyReferenceAssembly)' == ''">$(MSBuildThisFileDirectory)obj\runtime\$(MSBuildProjectName)\$(Configuration)\</BaseIntermediateOutputPath>
<IntermediateOutputPath Condition="'$(IsPackageProject)' == 'false' AND '$(ProduceOnlyReferenceAssembly)' == ''">$(MSBuildThisFileDirectory)obj\runtime\$(MSBuildProjectName)\$(Configuration)\</IntermediateOutputPath>
<BaseIntermediateOutputPath Condition="'$(IsPackageProject)' == 'false' AND '$(ProduceOnlyReferenceAssembly)' != ''">$(MSBuildThisFileDirectory)obj\ref\$(MSBuildProjectName)\$(Configuration)\</BaseIntermediateOutputPath>
<IntermediateOutputPath Condition="'$(IsPackageProject)' == 'false' AND '$(ProduceOnlyReferenceAssembly)' != ''">$(MSBuildThisFileDirectory)obj\ref\$(MSBuildProjectName)\$(Configuration)\</IntermediateOutputPath>
<BaseIntermediateOutputPath Condition="'$(IsPackageProject)' == 'true'">$(MSBuildThisFileDirectory)obj\pkg\$(MSBuildProjectName)\$(Configuration)\</BaseIntermediateOutputPath>
<IntermediateOutputPath Condition="'$(IsPackageProject)' == 'true'">$(MSBuildThisFileDirectory)obj\pkg\$(MSBuildProjectName)\$(Configuration)\</IntermediateOutputPath>
<OutputPath Condition="'$(IsPackageProject)' == 'false' AND '$(ProduceOnlyReferenceAssembly)' == ''">$(MSBuildThisFileDirectory)bin\$(Configuration)\runtime\</OutputPath>
<OutputPath Condition="'$(IsPackageProject)' == 'false' AND '$(ProduceOnlyReferenceAssembly)' != ''">$(MSBuildThisFileDirectory)bin\$(Configuration)\ref\</OutputPath>
<OutputPath Condition="'$(IsPackageProject)' == 'true' AND !$(MSBuildProjectName.Contains('.Ref'))">$(MSBuildThisFileDirectory)bin\$(Configuration)\pkg\runtime\</OutputPath>
<OutputPath Condition="'$(IsPackageProject)' == 'true' AND $(MSBuildProjectName.Contains('.Ref'))">$(MSBuildThisFileDirectory)bin\$(Configuration)\pkg\ref\</OutputPath>
<_TargetFrameworkVersionWithoutV Condition="'$(IsPackageProject)' == 'true'">6.0</_TargetFrameworkVersionWithoutV>
<WriteWebsiteArtifactFilesAfterTargets>GenerateBundles</WriteWebsiteArtifactFilesAfterTargets>
<WriteWebsiteArtifactFilesAfterTargets Condition="$([MSBuild]::IsOSPlatform('Linux'))">_CreateArchive;_CreateSymbolsArchive</WriteWebsiteArtifactFilesAfterTargets>
</PropertyGroup>
<Target Name="WriteWebsiteArtifactFiles" AfterTargets="$(WriteWebsiteArtifactFilesAfterTargets)" Condition="'$(GITHUB_ACTIONS)' == 'true' AND '$(IsPackageProject)' == 'true'">
<WriteLinesToFile
File="$(MSBuildThisFileDirectory)website\runtime\version.txt"
Lines="$(Version)"
Overwrite="true"
WriteOnlyWhenDifferent="true" />
<ItemGroup>
<FilesToDelete
Include="$(MSBuildThisFileDirectory)website\runtime\packages\$(ArchiveName)-*-$(RuntimeIdentifier).tar.gz"
Condition="$(RuntimeIdentifier.StartsWith('linux-')) AND $([MSBuild]::IsOSPlatform('Linux')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<FilesToDelete
Include="$(MSBuildThisFileDirectory)website\runtime\packages\$(InstallerName)-*-$(RuntimeIdentifier).pkg"
Condtion="$(RuntimeIdentifier.StartsWith('osx-')) AND $([MSBuild]::IsOSPlatform('OSX')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<FilesToDelete
Include="$(MSBuildThisFileDirectory)website\runtime\packages\$(InstallerName)-*-$(RuntimeIdentifier).exe"
Condition="$(RuntimeIdentifier.StartsWith('win-')) AND $([MSBuild]::IsOSPlatform('Windows')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<FilesToCopy
Include="$(MSBuildThisFileDirectory)artifacts\packages\Release\Shipping\$(ArchiveName)-$(Version)-$(RuntimeIdentifier).tar.gz"
Condition="$(RuntimeIdentifier.StartsWith('linux-')) AND $([MSBuild]::IsOSPlatform('Linux')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<FilesToCopy
Include="$(MSBuildThisFileDirectory)artifacts\packages\Release\Shipping\$(InstallerName)-$(Version)-$(RuntimeIdentifier).pkg"
Condition="$(RuntimeIdentifier.StartsWith('osx-')) AND $([MSBuild]::IsOSPlatform('OSX')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<FilesToCopy
Include="$(MSBuildThisFileDirectory)artifacts\packages\Release\Shipping\$(InstallerName)-$(Version)-$(RuntimeIdentifier).exe"
Condition="$(RuntimeIdentifier.StartsWith('win-')) AND $([MSBuild]::IsOSPlatform('Windows')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
<Copy
SourceFiles="@(FilesToCopy)"
DestinationFolder="$(MSBuildThisFileDirectory)website\runtime\packages\"
OverwriteReadOnlyFiles="true" />
<Message
Importance="high"
Text="$(ArchiveName)-$(Version)-$(RuntimeIdentifier).tar.gz -> $(MSBuildThisFileDirectory)website\runtime\packages\$(ArchiveName)-$(Version)-$(RuntimeIdentifier).tar.gz"
Condition="$(RuntimeIdentifier.StartsWith('linux-')) AND $([MSBuild]::IsOSPlatform('Linux')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<Message
Importance="high"
Text="$(InstallerName)-$(Version)-$(RuntimeIdentifier).pkg -> $(MSBuildThisFileDirectory)website\runtime\packages\$(InstallerName)-$(Version)-$(RuntimeIdentifier).pkg"
Condition="$(RuntimeIdentifier.StartsWith('osx-')) AND $([MSBuild]::IsOSPlatform('OSX')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
<Message
Importance="high"
Text="$(InstallerName)-$(Version)-$(RuntimeIdentifier).exe -> $(MSBuildThisFileDirectory)website\runtime\packages\$(InstallerName)-$(Version)-$(RuntimeIdentifier).exe"
Condition="$(RuntimeIdentifier.StartsWith('win-')) AND $([MSBuild]::IsOSPlatform('Windows')) AND $(MSBuildProjectName.Contains('.Bundle.'))" />
</Target>
</Project>