diff options
author | Adeel Mujahid <3840695+am11@users.noreply.github.com> | 2021-08-09 10:33:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 10:33:28 +0300 |
commit | 25bb59daa0b984640bd4e1620f11b279cb0c4b02 (patch) | |
tree | 51f54100836819f666a7b9c7a365cc23012da6ea /Directory.Build.targets | |
parent | 7a799ce4d21bf0777ca08f4fbf7981a233bb1d0c (diff) |
Move corehost.proj to corehost directory (#57036)
* Move corehost.proj to corehost directory
* Simplify host version overriding
Diffstat (limited to 'Directory.Build.targets')
-rw-r--r-- | Directory.Build.targets | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Directory.Build.targets b/Directory.Build.targets index ef235ee5ae6..532b24c473a 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -105,4 +105,42 @@ <FileWrites Include="$(_NETStandardCompatErrorFilePath)" /> </ItemGroup> </Target> + + <!-- + Arcade SDK versioning is defined by static properties in a targets file: work around this by + moving properties based on versioning into a target. + --> + <Target Name="GetProductVersions"> + <PropertyGroup> + <IncludePreReleaseLabelInPackageVersion Condition="'$(DotNetFinalVersionKind)' != 'release'">true</IncludePreReleaseLabelInPackageVersion> + <IncludePreReleaseLabelInPackageVersion Condition="'$(SuppressFinalPackageVersion)' == 'true'">true</IncludePreReleaseLabelInPackageVersion> + <IncludePreReleaseLabelInPackageVersion Condition="'$(IsShipping)' != 'true'">true</IncludePreReleaseLabelInPackageVersion> + + <IncludeBuildNumberInPackageVersion Condition="'$(StabilizePackageVersion)' != 'true'">true</IncludeBuildNumberInPackageVersion> + <IncludeBuildNumberInPackageVersion Condition="'$(SuppressFinalPackageVersion)' == 'true'">true</IncludeBuildNumberInPackageVersion> + <IncludeBuildNumberInPackageVersion Condition="'$(IsShipping)' != 'true'">true</IncludeBuildNumberInPackageVersion> + + <ProductVersionSuffix Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">-$(VersionSuffix)</ProductVersionSuffix> + <ProductBandVersion Condition="'$(ProductBandVersion)' == ''">$(MajorVersion).$(MinorVersion)</ProductBandVersion> + <ProductionVersion Condition="'$(ProductionVersion)' == ''">$(ProductBandVersion).$(PatchVersion)</ProductionVersion> + <ProductVersion>$(ProductionVersion)$(ProductVersionSuffix)</ProductVersion> + + <SharedFrameworkNugetVersion>$(ProductVersion)</SharedFrameworkNugetVersion> + <NuGetVersion>$(SharedFrameworkNugetVersion)</NuGetVersion> + <InstallersRelativePath>Runtime/$(SharedFrameworkNugetVersion)/</InstallersRelativePath> + + <!-- + By default, we are always building the nuget packages for HostPolicy, HostFXR and + Dotnet/AppHost. Thus, the properties (below) are always set to $(ProductVersion). + However, there are scenarios when only some of these components will change (e.g. during + servicing, we may only change HostPolicy but not HostFXR and Dotnet/AppHost). In such cases, + pass the appropriate version value(s) as argument to the build command in order to override; + e.g. 'build -p:HostPolicyVersion=x.y.z ...' + --> + <HostVersion Condition="'$(HostVersion)' == ''">$(ProductVersion)</HostVersion> + <AppHostVersion Condition="'$(AppHostVersion)' == ''">$(ProductVersion)</AppHostVersion> + <HostResolverVersion Condition="'$(HostResolverVersion)' == ''">$(ProductVersion)</HostResolverVersion> + <HostPolicyVersion Condition="'$(HostPolicyVersion)' == ''">$(ProductVersion)</HostPolicyVersion> + </PropertyGroup> + </Target> </Project> |