Consolidate dotnet-hosting and aspnetcore-shared installers (#728)

This commit is contained in:
John Luo 2017-12-27 13:07:55 -05:00 committed by Nate McMaster
parent 5fc5479e45
commit 44f1787cec
2 changed files with 18 additions and 36 deletions

View File

@ -16,8 +16,7 @@
<_InstallersOutputDir>$(ArtifactsDir)installers\</_InstallersOutputDir> <_InstallersOutputDir>$(ArtifactsDir)installers\</_InstallersOutputDir>
<!-- installers --> <!-- installers -->
<SharedFxInstallerName>aspnetcore-shared</SharedFxInstallerName> <SharedFxInstallerName>aspnetcore-runtime</SharedFxInstallerName>
<HostingInstallerName>dotnet-hosting</HostingInstallerName>
<DebConfigInFile>$(_PackagingDir)debian_config.json.in</DebConfigInFile> <DebConfigInFile>$(_PackagingDir)debian_config.json.in</DebConfigInFile>
<PublicCoreFeedPrefix>https://dotnetcli.blob.core.windows.net/dotnet/</PublicCoreFeedPrefix> <PublicCoreFeedPrefix>https://dotnetcli.blob.core.windows.net/dotnet/</PublicCoreFeedPrefix>
@ -37,8 +36,6 @@
<PackageRevision>1</PackageRevision> <PackageRevision>1</PackageRevision>
<LicenseType>Apache-2.0</LicenseType> <LicenseType>Apache-2.0</LicenseType>
<SharedFxSummary>Microsoft ASP.NET Core $(PackageVersion) Shared Framework</SharedFxSummary> <SharedFxSummary>Microsoft ASP.NET Core $(PackageVersion) Shared Framework</SharedFxSummary>
<SharedFxDescription>Shared Framework for Microsoft ASP.NET Core. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/aspnet/home). We happily accept issues and PRs.</SharedFxDescription> <SharedFxDescription>Shared Framework for hosting of Microsoft ASP.NET Core applications. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/aspnet/home). We happily accept issues and PRs.</SharedFxDescription>
<HostingSummary>Microsoft .NET Core $(PackageVersion) Linux Server Hosting</HostingSummary>
<HostingDescription>Microsoft .NET Core Linux Server Hosting enables hosting of ASP.NET Core applications and contains the ASP.NET Core Shared Framework and .NET Core Runtime. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/aspnet/home). We happily accept issues and PRs.</HostingDescription>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -21,19 +21,19 @@
<Target Name="GenerateTargzs" DependsOnTargets="_EnsureInstallerPrerequisites;_DownloadInstallers"> <Target Name="GenerateTargzs" DependsOnTargets="_EnsureInstallerPrerequisites;_DownloadInstallers">
<PropertyGroup> <PropertyGroup>
<HostingArchiveName>$(HostingInstallerName)-$(PackageVersion)-linux-x64.tar.gz</HostingArchiveName> <SharedFxArchiveName>$(SharedFxInstallerName)-$(PackageVersion)-linux-x64.tar.gz</SharedFxArchiveName>
</PropertyGroup> </PropertyGroup>
<!-- Clear working directory --> <!-- Clear working directory -->
<RemoveDir Directories="$(_WorkRoot)" /> <RemoveDir Directories="$(_WorkRoot)" />
<MakeDir Directories="$(_WorkRoot)" /> <MakeDir Directories="$(_WorkRoot)" />
<!-- Create layout: Aspnet Hosting Bundle --> <!-- Create layout: Aspnet Runtime -->
<Exec Command="tar -xzf $(SharedFxLinuxArchiveFilePath) -C $(_WorkRoot)" /> <Exec Command="tar -xzf $(SharedFxLinuxArchiveFilePath) -C $(_WorkRoot)" />
<Exec Command="tar -xzf $(_InstallerSourceDir)$(DotnetRuntimeInstallerArchiveName) -C $(_WorkRoot)" /> <Exec Command="tar -xzf $(_InstallerSourceDir)$(DotnetRuntimeInstallerArchiveName) -C $(_WorkRoot)" />
<!-- Create Aspnet Hosting Bundle tar.gz --> <!-- Create Aspnet Runtime tar.gz -->
<Exec Command="tar -czf $(_InstallersOutputDir)$(HostingArchiveName) -C $(_WorkRoot) ."/> <Exec Command="tar -czf $(_InstallersOutputDir)$(SharedFxArchiveName) -C $(_WorkRoot) ."/>
</Target> </Target>
<Target Name="_BuildDockerImage"> <Target Name="_BuildDockerImage">
@ -100,46 +100,36 @@
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_BuildDockerImage" Properties="Image=$(Image)" /> <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_BuildDockerImage" Properties="Image=$(Image)" />
<ItemGroup> <ItemGroup>
<RpmHostingDependencies Include="$(SharedFxInstallerName)-$(PackageVersion)" Version="$(PackageVersion)" />
<RpmHostingDependencies Include="$(DotnetRuntimeInstallerName)" Version="$(MicrosoftNETCoreApp21PackageVersion)" />
<!-- TODO: REMOVE - This dependency is a stop gap requirement until trampoline from 2.0 => 2.1 is implemented --> <!-- TODO: REMOVE - This dependency is a stop gap requirement until trampoline from 2.0 => 2.1 is implemented -->
<RpmSharedFxDependencies Include="aspnetcore-store-2.0.3" Version="2.0.3" /> <RpmSharedFxDependencies Include="aspnetcore-store-2.0.3" Version="2.0.3" />
<RpmSharedFxDependencies Include="$(DotnetRuntimeInstallerName)" Version="$(MicrosoftNETCoreApp21PackageVersion)" />
<RpmRHSharedFxDirectories Include="$(RHInstallRoot)/shared" /> <RpmRHSharedFxDirectories Include="$(RHInstallRoot)/shared" />
<RpmGenericSharedFxDirectories Include="$(InstallRoot)/shared" /> <RpmGenericSharedFxDirectories Include="$(InstallRoot)/shared" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<RpmHostingArguments>@(RpmHostingDependencies->' -d &quot;%(Identity) &gt;= %(Version)&quot;', ' ')</RpmHostingArguments>
<RpmSharedFxArguments>@(RpmSharedFxDependencies->' -d &quot;%(Identity) &gt;= %(Version)&quot;', ' ')</RpmSharedFxArguments> <RpmSharedFxArguments>@(RpmSharedFxDependencies->' -d &quot;%(Identity) &gt;= %(Version)&quot;', ' ')</RpmSharedFxArguments>
<RpmRHSharedFxArguments>@(RpmRHSharedFxDirectories->' --directories &quot;%(FullPath)&quot;', ' ')</RpmRHSharedFxArguments> <RpmRHSharedFxArguments>$(RpmSharedFxArguments) @(RpmRHSharedFxDirectories->' --directories &quot;%(FullPath)&quot;', ' ')</RpmRHSharedFxArguments>
<RpmGenericSharedFxArguments>@(RpmGenericSharedFxDirectories->' --directories &quot;%(FullPath)&quot;', ' ')</RpmGenericSharedFxArguments> <RpmGenericSharedFxArguments>$(RpmSharedFxArguments) @(RpmGenericSharedFxDirectories->' --directories &quot;%(FullPath)&quot;', ' ')</RpmGenericSharedFxArguments>
<RpmCommonArguments>Image=$(Image);RpmVendor=$(RpmVendor);RpmVersion=$(PackageVersion)</RpmCommonArguments> <RpmCommonArguments>Image=$(Image);RpmVendor=$(RpmVendor);RpmVersion=$(PackageVersion)</RpmCommonArguments>
<RpmCommonArguments>$(RpmCommonArguments);RpmMaintainerName=$(MaintainerName);RpmMaintainerEmail=$(MaintainerEmail)</RpmCommonArguments> <RpmCommonArguments>$(RpmCommonArguments);RpmMaintainerName=$(MaintainerName);RpmMaintainerEmail=$(MaintainerEmail)</RpmCommonArguments>
<RpmCommonArguments>$(RpmCommonArguments);RpmHomepage=$(Homepage);RpmRevision=$(PackageRevision)</RpmCommonArguments> <RpmCommonArguments>$(RpmCommonArguments);RpmHomepage=$(Homepage);RpmRevision=$(PackageRevision)</RpmCommonArguments>
<RpmCommonArguments>$(RpmCommonArguments);RpmLicense=$(LicenseType)</RpmCommonArguments> <RpmCommonArguments>$(RpmCommonArguments);RpmLicense=$(LicenseType)</RpmCommonArguments>
<RpmCommonArguments>$(RpmCommonArguments);RpmInstallerPrefix=$(SharedFxInstallerName);SharedFxArchive=$(SharedFxLinuxArchiveFilePath)</RpmCommonArguments>
<RpmCommonArguments>$(RpmCommonArguments);RpmMSummary=$(SharedFxSummary);RpmDescription=$(SharedFxDescription)</RpmCommonArguments>
<RpmCommonGenericArguments>RpmFileSuffix=rhel.7-x64.rpm;RpmInstallRoot=$(InstallRoot)</RpmCommonGenericArguments> <RpmCommonGenericArguments>RpmFileSuffix=rhel.7-x64.rpm;RpmInstallRoot=$(InstallRoot)</RpmCommonGenericArguments>
<RpmCommonRHArguments>RpmFileSuffix=rh.rhel.7-x64.rpm;RpmInstallRoot=$(RHInstallRoot)</RpmCommonRHArguments> <RpmCommonRHArguments>RpmFileSuffix=rh.rhel.7-x64.rpm;RpmInstallRoot=$(RHInstallRoot)</RpmCommonRHArguments>
<RpmCommonSharedFxArguments>RpmInstallerPrefix=$(SharedFxInstallerName);SharedFxArchive=$(SharedFxLinuxArchiveFilePath)</RpmCommonSharedFxArguments> <RpmSharedFxProps>$(RpmCommonArguments);$(RpmCommonGenericArguments);RpmArguments=$(RpmGenericSharedFxArguments)</RpmSharedFxProps>
<RpmCommonSharedFxArguments>$(RpmCommonSharedFxArguments);RpmMSummary=$(SharedFxSummary);RpmDescription=$(SharedFxDescription)</RpmCommonSharedFxArguments> <RpmRHSharedFxProps>$(RpmCommonArguments);$(RpmCommonRHArguments);RpmArguments=$(RpmRHSharedFxArguments)</RpmRHSharedFxProps>
<RpmCommonHostingArguments>RpmInstallerPrefix=$(HostingInstallerName);RpmArguments=$(RpmHostingArguments)</RpmCommonHostingArguments>
<RpmCommonHostingArguments>$(RpmCommonHostingArguments);RpmMSummary=$(HostingSummary);RpmDescription=$(HostingDescription)</RpmCommonHostingArguments>
<RpmSharedFxProps>$(RpmCommonArguments);$(RpmCommonGenericArguments);$(RpmCommonSharedFxArguments);RpmArguments=$(RpmGenericSharedFxArguments) $(RpmSharedFxArguments)</RpmSharedFxProps>
<RpmHostingProps>$(RpmCommonArguments);$(RpmCommonGenericArguments);$(RpmCommonHostingArguments)</RpmHostingProps>
<RpmRHSharedFxProps>$(RpmCommonArguments);$(RpmCommonRHArguments);$(RpmCommonSharedFxArguments);RpmArguments=$(RpmRHSharedFxArguments) $(RpmSharedFxArguments)</RpmRHSharedFxProps>
<RpmRHHostingProps>$(RpmCommonArguments);$(RpmCommonRHArguments);$(RpmCommonHostingArguments)</RpmRHHostingProps>
</PropertyGroup> </PropertyGroup>
<!-- Generic installers--> <!-- Generic installer-->
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RpmSharedFxProps)" /> <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RpmSharedFxProps)" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RpmHostingProps)" />
<!-- RH installers--> <!-- RH installer-->
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RpmRHSharedFxProps)" /> <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RpmRHSharedFxProps)" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRpm" Properties="$(RpmRHHostingProps)" />
<!-- Remove Docker Image to save disk space --> <!-- Remove Docker Image to save disk space -->
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_RemoveDockerImage" Properties="Image=$(Image)" /> <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_RemoveDockerImage" Properties="Image=$(Image)" />
@ -180,7 +170,7 @@
<GenerateFileFromTemplate TemplateFile="$(DebConfigInFile)" OutputPath="$(_WorkLayoutDir)debian_config.json" Properties="$(DebConfigProps)" /> <GenerateFileFromTemplate TemplateFile="$(DebConfigInFile)" OutputPath="$(_WorkLayoutDir)debian_config.json" Properties="$(DebConfigProps)" />
<!-- Build SharedFx and Hosting Bundle Deb package --> <!-- Build SharedFx Bundle Deb package -->
<Exec Command="docker run <Exec Command="docker run
--rm --rm
@ -192,7 +182,7 @@
./build.sh /t:RunDebTool" ./build.sh /t:RunDebTool"
ContinueOnError="WarnAndContinue" /> ContinueOnError="WarnAndContinue" />
<!-- Copy SharedFx and Hosting Bundle packages to output --> <!-- Copy SharedFx packages to output -->
<ItemGroup> <ItemGroup>
<GeneratedDebFiles Include="$(_WorkOutputDir)/*.deb" /> <GeneratedDebFiles Include="$(_WorkOutputDir)/*.deb" />
</ItemGroup> </ItemGroup>
@ -214,23 +204,18 @@
<ItemGroup> <ItemGroup>
<!-- TODO: REMOVE - This dependency is a stop gap requirement until trampoline from 2.0 => 2.1 is implemented --> <!-- TODO: REMOVE - This dependency is a stop gap requirement until trampoline from 2.0 => 2.1 is implemented -->
<_DebSharedFxDependencies Include="aspnetcore-store-2.0.3"/> <_DebSharedFxDependencies Include="aspnetcore-store-2.0.3"/>
<_DebHostingDependencies Include="$(DotnetRuntimeInstallerName)"/> <_DebSharedFxDependencies Include="$(DotnetRuntimeInstallerName)"/>
<_DebHostingDependencies Include="$(SharedFxInstallerName)-$(Version)"/>
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<DebSharedFxDependencies>@(_DebSharedFxDependencies->'"%(Identity)": {}', ', ')</DebSharedFxDependencies> <DebSharedFxDependencies>@(_DebSharedFxDependencies->'"%(Identity)": {}', ', ')</DebSharedFxDependencies>
<DebHostingDependencies>@(_DebHostingDependencies->'"%(Identity)": {}', ', ')</DebHostingDependencies>
<CommonProps>Image=$(Image);DebVersion=$(Version)</CommonProps> <CommonProps>Image=$(Image);DebVersion=$(Version)</CommonProps>
<DebSharedFxProps>DebPrefix=$(SharedFxInstallerName);DebSummary=$(SharedFxSummary);DebDescription=$(SharedFxDescription)</DebSharedFxProps> <DebSharedFxProps>DebPrefix=$(SharedFxInstallerName);DebSummary=$(SharedFxSummary);DebDescription=$(SharedFxDescription)</DebSharedFxProps>
<DebSharedFxProps>$(DebSharedFxProps);DebDependencies=$(DebSharedFxDependencies);SharedFxArchive=$(SharedFxLinuxArchiveFilePath)</DebSharedFxProps> <DebSharedFxProps>$(DebSharedFxProps);DebDependencies=$(DebSharedFxDependencies);SharedFxArchive=$(SharedFxLinuxArchiveFilePath)</DebSharedFxProps>
<DebHostingProps>DebPrefix=$(HostingInstallerName);DebSummary=$(HostingSummary);DebDescription=$(HostingDescription)</DebHostingProps>
<DebHostingProps>$(DebHostingProps);DebDependencies=$(DebHostingDependencies)</DebHostingProps>
</PropertyGroup> </PropertyGroup>
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDeb" Properties="$(CommonProps);$(DebSharedFxProps)" /> <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDeb" Properties="$(CommonProps);$(DebSharedFxProps)" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDeb" Properties="$(CommonProps);$(DebHostingProps)" />
<!-- Remove Docker Image to save disk space --> <!-- Remove Docker Image to save disk space -->
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_RemoveDockerImage" Properties="Image=$(Image)" /> <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_RemoveDockerImage" Properties="Image=$(Image)" />