Ensure the deb/rpm installers use the same dotnet-core version

- Remove unnecessary tasks and scripts
 - Ensure the KOREBUILD_DOTNET_* environment variables are preserved in the docker build context
 - Other MSBuild cleanup of the targets
This commit is contained in:
Nate McMaster 2017-10-17 15:46:53 -07:00
parent 1f6db0e3ad
commit 4bb84cf6d0
9 changed files with 88 additions and 140 deletions

View File

@ -4,7 +4,7 @@
<_WorkRoot>$(RepositoryRoot).w\</_WorkRoot>
</PropertyGroup>
<Target Name="_BuildFallbackArchive" DependsOnTargets="ResolveRepoInfo;_ResolveCurrentSharedFrameworkVersion">
<Target Name="_BuildFallbackArchive" DependsOnTargets="ResolveRepoInfo">
<Error Text="DotNetRestoreSources must be specified" Condition=" '$(DotNetRestoreSources)' == '' " />
<Error Text="OutputPackageName must be specified" Condition=" '$(OutputPackageName)' == '' " />
<Error Text="ArchiverPath must be specified" Condition=" '$(ArchiverPath)' == '' " />
@ -37,7 +37,7 @@
<MSBuild
Projects="$(_WorkRoot)Archive.csproj"
Targets="Restore"
Properties="RestorePackagesPath=$(FallbackStagingDir);RuntimeFrameworkVersion=$(SharedFrameworkVersion);DotNetRestoreSources=$(DotNetRestoreSources);AspNetUniverseBuildOffline=true" />
Properties="RestorePackagesPath=$(FallbackStagingDir);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp20PackageVersion);DotNetRestoreSources=$(DotNetRestoreSources);AspNetUniverseBuildOffline=true" />
<!-- Create the archive -->
<Exec Command="$(ArchiverPath) -a $(FallbackOutputArchive) $(FallbackStagingDir)" />

View File

@ -122,7 +122,7 @@
</PropertyGroup>
</Target>
<Target Name="BuildRuntimeStore" DependsOnTargets="_ResolveCurrentSharedFrameworkVersion;_ResolveRuntimeStoreRID;_PrepareRuntimeStoreBuildAssets;BuildRSReferencesPackage">
<Target Name="BuildRuntimeStore" DependsOnTargets="_ResolveRuntimeStoreRID;_PrepareRuntimeStoreBuildAssets;BuildRSReferencesPackage">
<!-- Copy and update build assets -->
<Copy SourceFiles="$(_TemplatesDirectory)RS.Manifest\RS.Manifest.csproj" DestinationFiles="$(_WorkRoot)RS.Manifest\RS.Manifest.csproj" />
<Copy SourceFiles="$(_SrcDirectory)Directory.Build.props" DestinationFolder="$(_WorkRoot)" />
@ -133,7 +133,7 @@
<_ComposeStoreProps>$(_ComposeStoreProps);ComposeDir=$(_RuntimeStoreOutputDirectory)</_ComposeStoreProps>
<_ComposeStoreProps>$(_ComposeStoreProps);ComposeWorkingDir=$(_RuntimeStoreWorkDirectory)</_ComposeStoreProps>
<_ComposeStoreProps>$(_ComposeStoreProps);RuntimeIdentifier=$(RuntimeStoreRID)</_ComposeStoreProps>
<_ComposeStoreProps>$(_ComposeStoreProps);RuntimeFrameworkVersion=$(SharedFrameworkVersion)</_ComposeStoreProps>
<_ComposeStoreProps>$(_ComposeStoreProps);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp20PackageVersion)</_ComposeStoreProps>
</PropertyGroup>
<!-- Build runtime store -->
@ -142,17 +142,7 @@
Properties="$(_ComposeStoreProps)" />
</Target>
<Target Name="_ResolveCurrentSharedFrameworkVersion">
<!-- Parse framework version -->
<Exec Command="powershell.exe $(_BuildScriptsDirectory)GetSharedFrameworkVersion.ps1" ConsoleToMSBuild="true" StandardOutputImportance="Normal" Condition="'$(OS)' == 'Windows_NT'">
<Output TaskParameter="ConsoleOutput" PropertyName="SharedFrameworkVersion" />
</Exec>
<Exec Command="bash $(_BuildScriptsDirectory)GetSharedFrameworkVersion.sh" ConsoleToMSBuild="true" StandardOutputImportance="Normal" Condition="'$(OS)' != 'Windows_NT'">
<Output TaskParameter="ConsoleOutput" PropertyName="SharedFrameworkVersion" />
</Exec>
</Target>
<Target Name="BuildHostingDeps" DependsOnTargets="ResolveRepoInfo;_ResolveCurrentSharedFrameworkVersion">
<Target Name="BuildHostingDeps" DependsOnTargets="ResolveRepoInfo">
<!-- Generate RS.Reference project -->
<RepoTasks.ResolveHostingStartupPackages
BuildArtifacts="@(ArtifactInfo)"
@ -163,7 +153,7 @@
<!--- MSBuild caches things if you run inproc so have to use Exec -->
<MSBuild Projects="$(_TemplatesDirectory)HostingStartup/HostingStartup.csproj"
Targets="Restore;Rebuild;CollectDeps"
Properties="DepsOutputPath=$(_DepsOutputDirectory);HostingStartupPackageName=%(HostingStartupArtifacts.PackageId);HostingStartupPackageVersion=%(HostingStartupArtifacts.Version);RuntimeFrameworkVersion=$(SharedFrameworkVersion)" />
Properties="DepsOutputPath=$(_DepsOutputDirectory);HostingStartupPackageName=%(HostingStartupArtifacts.PackageId);HostingStartupPackageVersion=%(HostingStartupArtifacts.Version);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp20PackageVersion)" />
<ItemGroup>
<DepsFiles Include="$(_DepsOutputDirectory)**\*.deps.json" />

View File

@ -16,57 +16,43 @@
<HostingInstallerName>dotnet-hosting</HostingInstallerName>
<RSDebConfigFile>$(_PackagingDir)store_debian_config.json</RSDebConfigFile>
<HostingDebConfigFile>$(_PackagingDir)hosting_debian_config.json</HostingDebConfigFile>
<CoreFeedPrefix Condition="'$(KOREBUILD_DOTNET_FEED_UNCACHED)'!=''">$(KOREBUILD_DOTNET_FEED_UNCACHED)</CoreFeedPrefix>
<CoreFeedPrefix Condition="'$(CoreFeedPrefix)'==''">https://dotnetcli.blob.core.windows.net/dotnet</CoreFeedPrefix>
</PropertyGroup>
<Target Name="BuildInstallers" DependsOnTargets="GenerateTargzs;GenerateRpms;GenerateDebs" />
<Target Name="_EnsureInstallerPrerequisites" DependsOnTargets="_ResolveCurrentSharedFrameworkVersion">
<Target Name="_EnsureInstallerPrerequisites">
<!-- Check Docker server OS -->
<Exec Command="docker version -f &quot;{{.Server.Os}}&quot;" ConsoleToMSBuild="true">
<Exec Command="docker version -f &quot;{{.Server.Os}}&quot;" StandardOutputImportance="Normal" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="DockerHostOS" />
</Exec>
<Error Text="Docker host must be using Linux containers." Condition="'$(DockerHostOS)' != 'linux'"/>
<!-- Generate timestamp free version -->
<RepoTasks.GetTimestampFreeVersion
TimestampVersion="$(Version)">
<Output TaskParameter="TimestampFreeVersion" ItemName="_TimestampFreeVersion" />
</RepoTasks.GetTimestampFreeVersion>
<PropertyGroup>
<CoreFeedPrefix Condition="'CoreFeedPrefix'==''">http://dotnetcli.azureedge.net</CoreFeedPrefix>
<RuntimeTargzLink>$(CoreFeedPrefix)/dotnet/Runtime/$(SharedFrameworkVersion)/dotnet-runtime-$(SharedFrameworkVersion)-linux-x64.tar.gz</RuntimeTargzLink>
</PropertyGroup>
<!-- Save properties for future use -->
<PropertyGroup>
<TimestampFreeVersion>@(_TimestampFreeVersion)</TimestampFreeVersion>
<RuntimeTargzLink>$(CoreFeedPrefix)/dotnet/Runtime/$(MicrosoftNETCoreApp20PackageVersion)/dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)-linux-x64.tar.gz</RuntimeTargzLink>
<RuntimeTargzLink Condition="'$(KOREBUILD_DOTNET_FEED_CREDENTIAL)' != ''">$(RuntimeTargzLink)$(KOREBUILD_DOTNET_FEED_CREDENTIAL)</RuntimeTargzLink>
</PropertyGroup>
<ItemGroup>
<_TimestampRSArchive Include="$(_TimestampRSSource)aspnetcore-store-$(Version)-linux-x64.tar.gz"/>
<_TimestampFreeRSArchive Include="$(_TimestampFreeRSSource)aspnetcore-store-$(TimestampFreeVersion)-linux-x64.tar.gz"/>
</ItemGroup>
<Error
Text="@(_TimestampRSArchive->Count()) timestamp linux archives found."
Condition="'@(_TimestampRSArchive->Count())' != 1 Or !Exists('@(_TimestampRSArchive)')" />
<Error
Text="@(_TimestampFreeRSArchive->Count()) no timestamp linux archives found."
Condition="'@(_TimestampFreeRSArchive->Count())' != 1 Or !Exists('@(_TimestampRSArchive)')" />
<!-- Save properties for future use -->
<PropertyGroup>
<TimestampRSArchive>@(_TimestampRSArchive)</TimestampRSArchive>
<TimestampFreeRSArchive>@(_TimestampFreeRSArchive)</TimestampFreeRSArchive>
<TimestampRSArchive>$(_TimestampRSSource)aspnetcore-store-$(PackageVersion)-linux-x64.tar.gz</TimestampRSArchive>
<TimestampFreeRSArchive>$(_TimestampFreeRSSource)aspnetcore-store-$(PackageVersionNoTimestamp)-linux-x64.tar.gz</TimestampFreeRSArchive>
</PropertyGroup>
<Error
Text="Timestamp linux archive not found. Expected it to exist in $(TimestampRSArchive)."
Condition="!Exists('$(TimestampRSArchive)')" />
<Error
Text="Non-timestamp linux archive not found. Expected it to exist in $(TimestampFreeRSArchive)."
Condition="!Exists('$(TimestampFreeRSArchive)')" />
</Target>
<Target Name="_DownloadCoreInstallers">
<!-- Download dotnet installers -->
<MakeDir Directories="$(_CoreInstallerSource)" />
<Exec Command="curl &quot;$(RuntimeTargzLink)$(CoreFeedSuffix)&quot; -o $(_CoreInstallerSource)dotnet-runtime-$(SharedFrameworkVersion)-linux-x64.tar.gz" />
<Exec Command="curl &quot;$(RuntimeTargzLink)&quot; -o $(_CoreInstallerSource)dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)-linux-x64.tar.gz" />
</Target>
<Target Name="_GenerateTargz">
@ -83,14 +69,10 @@
</Target>
<Target Name="GenerateTargzs" DependsOnTargets="_EnsureInstallerPrerequisites;_DownloadCoreInstallers">
<ItemGroup>
<_RuntimeArchive Include="$(_CoreInstallerSource)dotnet-runtime-$(SharedFrameworkVersion)-linux-x64.tar.gz" />
</ItemGroup>
<PropertyGroup>
<RuntimeArchive>@(_RuntimeArchive)</RuntimeArchive>
<RuntimeArchive>$(_CoreInstallerSource)dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)-linux-x64.tar.gz</RuntimeArchive>
<HostingArchiveName>$(HostingInstallerName)-$(Version)-linux-x64.tar.gz</HostingArchiveName>
<TimestampFreeHostingArchiveName>$(HostingInstallerName)-$(TimestampFreeVersion)-linux-x64.tar.gz</TimestampFreeHostingArchiveName>
<TimestampFreeHostingArchiveName>$(HostingInstallerName)-$(PackageVersionNoTimestamp)-linux-x64.tar.gz</TimestampFreeHostingArchiveName>
</PropertyGroup>
<!-- Timestamp hosting bundle -->
@ -151,6 +133,11 @@
<Exec Command="docker run
--rm
-v $(RepositoryRoot):$(_DockerRootDirectory)
-e 'KOREBUILD_DOTNET_VERSION=$(KOREBUILD_DOTNET_VERSION)'
-e 'KOREBUILD_DOTNET_SHARED_RUNTIME_VERSION=$(KOREBUILD_DOTNET_SHARED_RUNTIME_VERSION)'
-e 'KOREBUILD_DOTNET_FEED_CDN=$(KOREBUILD_DOTNET_FEED_CDN)'
-e 'KOREBUILD_DOTNET_FEED_UNCACHED=$(KOREBUILD_DOTNET_FEED_UNCACHED)'
-e 'KOREBUILD_DOTNET_FEED_CREDENTIAL=$(KOREBUILD_DOTNET_FEED_CREDENTIAL)'
docker-image-$(Image)
fpm
--verbose
@ -179,7 +166,7 @@
<RHInstallerInstallRoot>/opt/rh/rh-dotnet20/root/usr/lib64/dotnet/</RHInstallerInstallRoot>
<GenericInstallerInstallRoot>/usr/share/dotnet/</GenericInstallerInstallRoot>
</PropertyGroup>
<!-- Build Docker Image -->
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_BuildDockerImage" Properties="Image=$(Image)" />
@ -232,17 +219,17 @@
<RHStoreDirectories Include="$(RHInstallerInstallRoot)store" />
<GenericStoreDirectories Include="$(GenericInstallerInstallRoot)additionalDeps" />
<GenericStoreDirectories Include="$(GenericInstallerInstallRoot)store" />
<HostingDependencies Include="$(RSInstallerName)-$(Version)">
<Version>$(Version)</Version>
<HostingDependencies Include="$(RSInstallerName)-$(PackageVersion)">
<Version>$(PackageVersion)</Version>
</HostingDependencies>
<HostingDependencies Include="dotnet-runtime-$(SharedFrameworkVersion)">
<Version>$(SharedFrameworkVersion)</Version>
<HostingDependencies Include="dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)">
<Version>$(MicrosoftNETCoreApp20PackageVersion)</Version>
</HostingDependencies>
<TimestampFreeHostingDependencies Include="$(RSInstallerName)-$(TimestampFreeVersion)">
<Version>$(TimestampFreeVersion)</Version>
<TimestampFreeHostingDependencies Include="$(RSInstallerName)-$(PackageVersionNoTimestamp)">
<Version>$(PackageVersionNoTimestamp)</Version>
</TimestampFreeHostingDependencies>
<TimestampFreeHostingDependencies Include="dotnet-runtime-$(SharedFrameworkVersion)">
<Version>$(SharedFrameworkVersion)</Version>
<TimestampFreeHostingDependencies Include="dotnet-runtime-$(MicrosoftNETCoreApp20PackageVersion)">
<Version>$(MicrosoftNETCoreApp20PackageVersion)</Version>
</TimestampFreeHostingDependencies>
</ItemGroup>
@ -251,7 +238,7 @@
<TimestampFreeHostingFPMArguments>@(TimestampFreeHostingDependencies->' -d &quot;%(Identity) &gt;= %(Version)&quot;', ' ')</TimestampFreeHostingFPMArguments>
<RHRSArguments>@(RHStoreDirectories->' --directories &quot;%(FullPath)&quot;', ' ')</RHRSArguments>
<GenericRSArguments>@(GenericStoreDirectories->' --directories &quot;%(FullPath)&quot;', ' ')</GenericRSArguments>
<CommonArguments>Image=$(Image);RPMVendor=$(RPMVendor)</CommonArguments>
<CommonGenericArguments>RPMFileSuffix=rhel.7-x64.rpm;RPMInstallRoot=$(GenericInstallerInstallRoot)</CommonGenericArguments>
<CommonRHArguments>RPMFileSuffix=rhel.rh.7-x64.rpm;RPMInstallRoot=$(RHInstallerInstallRoot)</CommonRHArguments>
@ -260,35 +247,35 @@
<CommonRSArguments>$(CommonRSArguments);RPMInstallerPrefix=$(RSInstallerName);RPMRevision=@(_RSPackageRevision)</CommonRSArguments>
<CommonRSArguments>$(CommonRSArguments);RPMSummary=@(_RSInstallerSummary);RPMDescription=@(_RSDescription)</CommonRSArguments>
<CommonRSArguments>$(CommonRSArguments);RPMLicense=@(_RSLicense);RPMHomepage=@(_RSHomepage)</CommonRSArguments>
<CommonHostingArguments>$(CommonArguments);MaintainerName=@(_HostingMaintainerName);MaintainerEmail=@(_HostingMaintainerEmail)</CommonHostingArguments>
<CommonHostingArguments>$(CommonHostingArguments);RPMInstallerPrefix=$(HostingInstallerName);RPMRevision=@(_HostingRevision)</CommonHostingArguments>
<CommonHostingArguments>$(CommonHostingArguments);RPMSummary=@(_HostingSummary);RPMDescription=@(_HostingDescription)</CommonHostingArguments>
<CommonHostingArguments>$(CommonHostingArguments);RPMLicense=@(_HostingLicense);RPMHomepage=@(_HostingHomepage)</CommonHostingArguments>
<TimestampRSArguments>$(CommonArguments);$(CommonGenericArguments);$(CommonRSArguments)</TimestampRSArguments>
<TimestampRSArguments>$(TimestampRSArguments);RSArchive=$(TimestampRSArchive);RPMVersion=$(Version);RPMArguments=$(GenericRSArguments)</TimestampRSArguments>
<TimestampRSArguments>$(TimestampRSArguments);RSArchive=$(TimestampRSArchive);RPMVersion=$(PackageVersion);RPMArguments=$(GenericRSArguments)</TimestampRSArguments>
<TimestampFreeRSArguments>$(CommonArguments);$(CommonGenericArguments);$(CommonRSArguments)</TimestampFreeRSArguments>
<TimestampFreeRSArguments>$(TimestampFreeRSArguments);RSArchive=$(TimestampFreeRSArchive);RPMVersion=$(TimestampFreeVersion);RPMArguments=$(GenericRSArguments)</TimestampFreeRSArguments>
<TimestampFreeRSArguments>$(TimestampFreeRSArguments);RSArchive=$(TimestampFreeRSArchive);RPMVersion=$(PackageVersionNoTimestamp);RPMArguments=$(GenericRSArguments)</TimestampFreeRSArguments>
<TimestampHostingArguments>$(CommonArguments);$(CommonGenericArguments);$(CommonHostingArguments)</TimestampHostingArguments>
<TimestampHostingArguments>$(TimestampHostingArguments);RPMVersion=$(Version);RPMArguments=$(HostingArguments)</TimestampHostingArguments>
<TimestampHostingArguments>$(TimestampHostingArguments);RPMVersion=$(PackageVersion);RPMArguments=$(HostingArguments)</TimestampHostingArguments>
<TimestampFreeHostingArguments>$(CommonArguments);$(CommonGenericArguments);$(CommonHostingArguments)</TimestampFreeHostingArguments>
<TimestampFreeHostingArguments>$(TimestampFreeHostingArguments);RPMVersion=$(TimestampFreeVersion);RPMArguments=$(TimestampFreeHostingFPMArguments)</TimestampFreeHostingArguments>
<TimestampFreeHostingArguments>$(TimestampFreeHostingArguments);RPMVersion=$(PackageVersionNoTimestamp);RPMArguments=$(TimestampFreeHostingFPMArguments)</TimestampFreeHostingArguments>
<RHTimestampRSArguments>$(CommonArguments);$(CommonRHArguments);$(CommonRSArguments)</RHTimestampRSArguments>
<RHTimestampRSArguments>$(RHTimestampRSArguments);RSArchive=$(TimestampRSArchive);RPMVersion=$(Version);RPMArguments=$(RHRSArguments)</RHTimestampRSArguments>
<RHTimestampRSArguments>$(RHTimestampRSArguments);RSArchive=$(TimestampRSArchive);RPMVersion=$(PackageVersion);RPMArguments=$(RHRSArguments)</RHTimestampRSArguments>
<RHTimestampFreeRSArguments>$(CommonArguments);$(CommonRHArguments);$(CommonRSArguments)</RHTimestampFreeRSArguments>
<RHTimestampFreeRSArguments>$(RHTimestampFreeRSArguments);RSArchive=$(TimestampFreeRSArchive);RPMVersion=$(TimestampFreeVersion);RPMArguments=$(RHRSArguments)</RHTimestampFreeRSArguments>
<RHTimestampFreeRSArguments>$(RHTimestampFreeRSArguments);RSArchive=$(TimestampFreeRSArchive);RPMVersion=$(PackageVersionNoTimestamp);RPMArguments=$(RHRSArguments)</RHTimestampFreeRSArguments>
<RHTimestampHostingArguments>$(CommonArguments);$(CommonRHArguments);$(CommonHostingArguments)</RHTimestampHostingArguments>
<RHTimestampHostingArguments>$(RHTimestampHostingArguments);RPMVersion=$(Version);RPMArguments=$(HostingArguments)</RHTimestampHostingArguments>
<RHTimestampHostingArguments>$(RHTimestampHostingArguments);RPMVersion=$(PackageVersion);RPMArguments=$(HostingArguments)</RHTimestampHostingArguments>
<RHTimestampFreeHostingArguments>$(CommonArguments);$(CommonRHArguments);$(CommonHostingArguments)</RHTimestampFreeHostingArguments>
<RHTimestampFreeHostingArguments>$(RHTimestampFreeHostingArguments);RPMVersion=$(TimestampFreeVersion);RPMArguments=$(TimestampFreeHostingFPMArguments)</RHTimestampFreeHostingArguments>
<RHTimestampFreeHostingArguments>$(RHTimestampFreeHostingArguments);RPMVersion=$(PackageVersionNoTimestamp);RPMArguments=$(TimestampFreeHostingFPMArguments)</RHTimestampFreeHostingArguments>
</PropertyGroup>
<!-- General Timestamp runtime store -->
@ -299,7 +286,7 @@
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(TimestampHostingArguments)" />
<!-- General Timestamp free hosting bundle -->
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(TimestampFreeHostingArguments)" />
<!-- RH Timestamp runtime store -->
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RHTimestampRSArguments)" />
<!-- RH Timestamp free runtime store -->
@ -345,6 +332,11 @@
-e DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
-e INSTALLER_NAME=$(DebPrefix)-$(DebVersion)
-e INSTALLER_VERSION=$(DebVersion)
-e 'KOREBUILD_DOTNET_VERSION=$(KOREBUILD_DOTNET_VERSION)'
-e 'KOREBUILD_DOTNET_SHARED_RUNTIME_VERSION=$(KOREBUILD_DOTNET_SHARED_RUNTIME_VERSION)'
-e 'KOREBUILD_DOTNET_FEED_CDN=$(KOREBUILD_DOTNET_FEED_CDN)'
-e 'KOREBUILD_DOTNET_FEED_UNCACHED=$(KOREBUILD_DOTNET_FEED_UNCACHED)'
-e 'KOREBUILD_DOTNET_FEED_CREDENTIAL=$(KOREBUILD_DOTNET_FEED_CREDENTIAL)'
docker-image-$(Image)
./build.sh /t:RunDebTool"
ContinueOnError="WarnAndContinue" />
@ -353,9 +345,9 @@
<ItemGroup>
<GeneratedDebFiles Include="$(_WorkOutputDir)/*.deb" />
</ItemGroup>
<Error Text="@(GeneratedDebFiles->Count()) deb installer files generated." Condition="'@(GeneratedDebFiles->Count())' != 1" />
<Copy
DestinationFiles="$(ArtifactsDir)$(DebPrefix)-$(DebVersion)-$(Image)-x64.deb"
SourceFiles="@(GeneratedDebFiles)"
@ -367,42 +359,42 @@
<Target Name="_GenerateDebOnPlatform">
<PropertyGroup>
<CommonRSArguments>Image=$(Image);DebConfig=$(RSDebConfigFile);DebPrefix=$(RSInstallerName)</CommonRSArguments>
<CommonHostingArguments>Image=$(Image);DebConfig=$(HostingDebConfigFile);DotnetVersion=$(SharedFrameworkVersion);DebPrefix=$(HostingInstallerName)</CommonHostingArguments>
<CommonHostingArguments>Image=$(Image);DebConfig=$(HostingDebConfigFile);DotnetVersion=$(MicrosoftNETCoreApp20PackageVersion);DebPrefix=$(HostingInstallerName)</CommonHostingArguments>
</PropertyGroup>
<!-- Build Docker Image -->
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_BuildDockerImage" Properties="Image=$(Image)" />
<MSBuild
Projects="$(MSBuildProjectFullPath)"
Targets="_GenerateDeb"
<MSBuild
Projects="$(MSBuildProjectFullPath)"
Targets="_GenerateDeb"
Properties="$(CommonRSArguments);RSArchive=$(TimestampRSArchive);DebVersion=$(Version)" />
<MSBuild
Projects="$(MSBuildProjectFullPath)"
Targets="_GenerateDeb"
Properties="$(CommonRSArguments);RSArchive=$(TimestampFreeRSArchive);DebVersion=$(TimestampFreeVersion)" />
<MSBuild
Projects="$(MSBuildProjectFullPath)"
Targets="_GenerateDeb"
<MSBuild
Projects="$(MSBuildProjectFullPath)"
Targets="_GenerateDeb"
Properties="$(CommonRSArguments);RSArchive=$(TimestampFreeRSArchive);DebVersion=$(PackageVersionNoTimestamp)" />
<MSBuild
Projects="$(MSBuildProjectFullPath)"
Targets="_GenerateDeb"
Properties="$(CommonHostingArguments);DebVersion=$(Version)" />
<MSBuild
Projects="$(MSBuildProjectFullPath)"
Targets="_GenerateDeb"
Properties="$(CommonHostingArguments);DebVersion=$(TimestampFreeVersion)" />
<MSBuild
Projects="$(MSBuildProjectFullPath)"
Targets="_GenerateDeb"
Properties="$(CommonHostingArguments);DebVersion=$(PackageVersionNoTimestamp)" />
<!-- Remove Docker Image to save disk space -->
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_RemoveDockerImage" Properties="Image=$(Image)" />
</Target>
<Target Name="GenerateDebs" DependsOnTargets="_EnsureInstallerPrerequisites">
<PropertyGroup>
<CommonArguments>Version=$(Version);TimestampFreeVersion=$(TimestampFreeVersion)</CommonArguments>
<CommonArguments>Version=$(Version);TimestampFreeVersion=$(PackageVersionNoTimestamp)</CommonArguments>
</PropertyGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=debian.8" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=ubuntu.14.04" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=ubuntu.16.04" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=ubuntu.16.10" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=debian.8" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=ubuntu.14.04" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=ubuntu.16.04" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="$(CommonArguments);Image=ubuntu.16.10" />
</Target>
<Target Name="RunDebTool">
@ -410,7 +402,7 @@
<MSBuild Projects="$(_DebToolDir)dotnet-deb-tool-consumer.csproj" Targets="Restore" />
<!-- Build deb package -->
<Exec
<Exec
Command="dotnet deb-tool -i $(_WorkLayoutDir) -o $(_WorkOutputDir) -n $(INSTALLER_NAME) -v $(INSTALLER_VERSION)"
WorkingDirectory="$(_DebToolDir)" />
</Target>

View File

@ -30,6 +30,7 @@
<DotNetCoreFeed>https://dotnet.myget.org/F/dotnet-core/api/v3/index.json</DotNetCoreFeed>
<CoreSetupPackageVersion>2.0.2-servicing-25728-02</CoreSetupPackageVersion>
<MicrosoftNETCorePlatformsPackageVersion>2.0.0</MicrosoftNETCorePlatformsPackageVersion>
<MicrosoftNETCoreApp20PackageVersion>$(CoreSetupPackageVersion)</MicrosoftNETCoreApp20PackageVersion>
</PropertyGroup>
<ItemGroup>

View File

@ -1,26 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Linq;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using RepoTasks.Utilities;
namespace RepoTasks
{
public class GetTimestampFreeVersion : Task
{
[Required]
public string TimestampVersion { get; set; }
[Output]
public string TimestampFreeVersion { get; set; }
public override bool Execute()
{
TimestampFreeVersion = VersionUtilities.GetTimestampFreeVersion(TimestampVersion);
return true;
}
}
}

View File

@ -17,6 +17,5 @@
<UsingTask TaskName="RepoTasks.CreateCommonManifest" AssemblyFile="$(_RepoTaskAssembly)" />
<UsingTask TaskName="RepoTasks.ComposeNewStore" AssemblyFile="$(_RepoTaskAssembly)" />
<UsingTask TaskName="RepoTasks.ConsolidateManifests" AssemblyFile="$(_RepoTaskAssembly)" />
<UsingTask TaskName="RepoTasks.GetTimestampFreeVersion" AssemblyFile="$(_RepoTaskAssembly)" />
<UsingTask TaskName="RepoTasks.ReplaceInFile" AssemblyFile="$(_RepoTaskAssembly)" />
</Project>

View File

@ -1,6 +0,0 @@
$infoOutput = dotnet --info
$versions = $infoOutput | Select-String -Pattern "version"
$FXVersionRaw = $versions | Select-Object -Last 1
$FXVersionString = $FXVersionRaw.ToString()
$FXVersion = $FXVersionString.SubString($FXVersionString.IndexOf(':') + 1).Trim()
Write-Host $FXVersion

View File

@ -1,2 +0,0 @@
#!/usr/bin/env bash
dotnet --info | grep -i version | tail -1 | cut -f 2 -d ":" | tr -d ' '

View File

@ -19,7 +19,7 @@
<PackageTags>aspnetcore</PackageTags>
<Description>Microsoft.AspNetCore.All</Description>
<EnableApiCheck>false</EnableApiCheck>
<RuntimeFrameworkVersion>$(CoreSetupPackageVersion)</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>$(MicrosoftNETCoreApp20PackageVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>