-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDirectory.Build.props
80 lines (72 loc) · 4.44 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
<Project>
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);MSB3270</NoWarn>
<CsWinRTIIDOptimizerOptOut>true</CsWinRTIIDOptimizerOptOut>
</PropertyGroup>
<!-- Centralized location for all generated artifacts -->
<PropertyGroup>
<PackageOutputPath>$(MSBuildThisFileDirectory)artifacts/</PackageOutputPath>
</PropertyGroup>
<!--
The target version being built (this is referenced by all build steps).
This version will set the package version prefix and the assembly version.
As such, this needs to be changed before a new release as well.
-->
<PropertyGroup>
<ShmuelieWinRTServerPackageVersion>2.1.1</ShmuelieWinRTServerPackageVersion>
<IsCommitOnReleaseBranch>false</IsCommitOnReleaseBranch>
</PropertyGroup>
<!--
Check if the current push is for a release build for NuGet, as that will create a package with a hardcoded version.
A release build is one that originates from a push to a branch with the format 'rel/<BUILD_VERSION>(.<SUFFIX>)?'.
-->
<PropertyGroup>
<ReleaseVersionParsingRegex>^rel/(\d{1,4}\.\d{1,4}\.\d{1,4})(?:-(\w+(?:\.\w+)?))?$</ReleaseVersionParsingRegex>
<IsBranchNameStartingWithRefPrefix>$([System.Text.RegularExpressions.Regex]::IsMatch($(GITHUB_REF_NAME), $(ReleaseVersionParsingRegex)))</IsBranchNameStartingWithRefPrefix>
</PropertyGroup>
<!-- If the current branch and action match a release for NuGet, override the relative build properties -->
<PropertyGroup Condition="'$(GITHUB_EVENT_NAME)' == 'push' AND '$(GITHUB_REF_NAME)' != '' AND '$(IsBranchNameStartingWithRefPrefix)' == 'true'">
<IsCommitOnReleaseBranch>true</IsCommitOnReleaseBranch>
<ShmuelieWinRTServerPackageVersionFromReleaseBranch>$([System.Text.RegularExpressions.Regex]::Match($(GITHUB_REF_NAME), $(ReleaseVersionParsingRegex)).Groups[1].Value)</ShmuelieWinRTServerPackageVersionFromReleaseBranch>
<ShmuelieWinRTServerPackageVersionSuffixFromReleaseBranch>$([System.Text.RegularExpressions.Regex]::Match($(GITHUB_REF_NAME), $(ReleaseVersionParsingRegex)).Groups[2].Value)</ShmuelieWinRTServerPackageVersionSuffixFromReleaseBranch>
<ShmuelieWinRTServerPackageVersion>$(ShmuelieWinRTServerPackageVersionFromReleaseBranch)</ShmuelieWinRTServerPackageVersion>
<VersionSuffix>$(ShmuelieWinRTServerPackageVersionSuffixFromReleaseBranch)</VersionSuffix>
</PropertyGroup>
<!-- Configure the assembly version and suffix for both normal CI builds and release builds -->
<PropertyGroup>
<AssemblyVersion>$(ShmuelieWinRTServerPackageVersion).0</AssemblyVersion>
<VersionPrefix>$(ShmuelieWinRTServerPackageVersion)</VersionPrefix>
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' != 'pull_request' AND '$(IsCommitOnReleaseBranch)' != 'true'">alpha</VersionSuffix>
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request' AND '$(IsCommitOnReleaseBranch)' != 'true'">pr</VersionSuffix>
</PropertyGroup>
<PropertyGroup>
<ContinuousIntegrationBuild Condition="'$(GITHUB_RUN_ID)' != ''">true</ContinuousIntegrationBuild>
<RepositoryUrl>https://github.com/shmuelie/Shmuelie.WinRTServer/</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<ProjectUrl>https://github.com/shmuelie/Shmuelie.WinRTServer/</ProjectUrl>
<Authors>Shmueli Englard</Authors>
<Owners>Shmueli Englard</Owners>
<Company>Shmueli Englard</Company>
<Copyright>Copyright (c) 2025 Shmueli Englard</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageIcon>$(MSBuildProjectName)-128.png</PackageIcon>
<PackageIconUrl>https://github.com/shmuelie/Shmuelie.WinRTServer/blob/main/Shmuelie.WinRTServer-64.png?raw=true</PackageIconUrl>
<PackageTags>dotnet net netcore netstandard csharp library windows com winrt oop outofprocess rpc</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Description>Out-of-Process WinRT/COM Server</Description>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.2.4" PrivateAssets="all" />
</ItemGroup>
<!-- Needed for deterministic builds -->
<ItemGroup>
<SourceRoot Include="$(MSBuildThisFileDirectory)/"/>
</ItemGroup>
</Project>