Fix output directories.
authorEric Erhardt <eric.erhardt@microsoft.com>
Thu, 19 Oct 2017 23:29:45 +0000 (18:29 -0500)
committerWes Haggard <Wes.Haggard@microsoft.com>
Fri, 27 Oct 2017 16:10:02 +0000 (09:10 -0700)
1. Use PackageOutputPath variable exclusively everywhere instead of our own name for the same path.
2. Split nuget packages and installer assets into separate paths - packages and assets.

Commit migrated from https://github.com/dotnet/core-setup/commit/cd7c3d21acc02bac3f52aca6571dd516165c4bda

src/installer/pkg/dir.props
src/installer/pkg/packaging/deb/package.props
src/installer/pkg/packaging/deb/package.targets
src/installer/pkg/packaging/dir.proj
src/installer/sharedFramework/sharedFramework.proj

index 9137b13..b83e911 100644 (file)
@@ -12,8 +12,6 @@
   </PropertyGroup>
 
   <PropertyGroup>
-    <PackageOutputPath>$(PackagesOutDir)</PackageOutputPath>
-    <SymbolPackageOutputPath>$(SymbolPackagesOutDir)</SymbolPackageOutputPath>
     <PackageLicenseFile>$(ProjectDir)LICENSE.TXT</PackageLicenseFile>
     <PackageThirdPartyNoticesFile>$(ProjectDir)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
     <LicenseUrl>https://github.com/dotnet/core-setup/blob/master/LICENSE.TXT</LicenseUrl>
index 2b9c211..fb99eff 100644 (file)
@@ -2,7 +2,7 @@
 <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
     <dotnetDebToolSource>$(ProjectDir)tools-local/setuptools/dotnet-deb-tool/</dotnetDebToolSource>
-    <dotnetDebToolPackageSource>$(PackagesOutDir)</dotnetDebToolPackageSource>
+    <dotnetDebToolPackageSource>$(PackageOutputPath)</dotnetDebToolPackageSource>
     <toolConsumerProjectName>dotnet-deb-tool-consumer.csproj</toolConsumerProjectName>
     <consumingProjectDirectory>$(IntermediateOutputRootPath)$(toolConsumerProjectName)</consumingProjectDirectory>
     <debPackaginfConfigPath>$(PackagingRoot)deb/</debPackaginfConfigPath>
index a959b46..eaf25a8 100644 (file)
     </PropertyGroup>
 
     <Exec Command="$(DotnetRestoreCommand) $(dotnetDebToolSource)"/>
-    <Exec Command="$(DotnetToolCommand) pack $(dotnetDebToolSource) --output $(PackagesOutDir)intermediate/ $(VersionSuffixArg)"/>
-
-    <ItemGroup>
-      <pkFiles Include="$(PackagesOutDir)intermediate/dotnet-deb-tool.*.nupkg"
-               Exclude="$(PackagesOutDir)intermediate/*.symbols.nupkg" />
-    </ItemGroup>
-
-    <Copy SourceFiles="@(pkFiles)" DestinationFolder="$(PackagesOutDir)" />
+    <Exec Command="$(DotnetToolCommand) pack $(dotnetDebToolSource) --output $(PackageOutputPath) $(VersionSuffixArg)"/>
 
     <RemoveDir Condition="Exists('$(consumingProjectDirectory)')"
                Directories="$(consumingProjectDirectory)" />
index 374e1ee..ce6ad92 100644 (file)
@@ -79,8 +79,8 @@
           DestinationFolder="$(CombinedPublishRoot)/%(CombinedFiles.RecursiveDir)" />
 
     <!-- create output dir -->
-    <MakeDir Condition="!Exists('$(PackagesOutDir)')"
-             Directories="$(PackagesOutDir)" />
+    <MakeDir Condition="!Exists('$(AssetOutputPath)')"
+             Directories="$(AssetOutputPath)" />
   </Target>
 
   <Target Name="GenerateVersionBadge">
 
     <ZipFileCreateFromDirectory
         SourceDirectory="$(CombinedPublishRoot)"
-        DestinationArchive="$(PackagesOutDir)$(CombinedCompressedFile)"
+        DestinationArchive="$(AssetOutputPath)$(CombinedCompressedFile)"
         OverwriteDestination="true" />
 
     <ZipFileCreateFromDirectory
         SourceDirectory="$(HostFxrPublishRoot)"
-        DestinationArchive="$(PackagesOutDir)$(HostFxrCompressedFile)"
+        DestinationArchive="$(AssetOutputPath)$(HostFxrCompressedFile)"
         OverwriteDestination="true" />
 
     <ZipFileCreateFromDirectory
         SourceDirectory="$(SharedFrameworkPublishRoot)"
-        DestinationArchive="$(PackagesOutDir)$(SharedFrameworkCompressedFile)"
+        DestinationArchive="$(AssetOutputPath)$(SharedFrameworkCompressedFile)"
         OverwriteDestination="true" />
 
     <ZipFileCreateFromDirectory
         SourceDirectory="$(SharedFrameworkPublishSymbolsDir)"
-        DestinationArchive="$(PackagesOutDir)$(SharedFrameworkSymbolsCompressedFile)"
+        DestinationArchive="$(AssetOutputPath)$(SharedFrameworkSymbolsCompressedFile)"
         OverwriteDestination="true" />
   </Target>
 
 
     <!-- tar command will throw 'file changed as we read it' on some distros.  ignore that error.
          we use -C so that we get a relative folder structure which is compressed rather than the full path -->
-    <Exec Command="tar -C $(CombinedPublishRoot) -czf $(PackagesOutDir)$(CombinedCompressedFile) ."
+    <Exec Command="tar -C $(CombinedPublishRoot) -czf $(AssetOutputPath)$(CombinedCompressedFile) ."
           IgnoreExitCode="true"
           IgnoreStandardErrorWarningFormat="true" />
-    <Exec Command="tar -C $(HostFxrPublishRoot) -czf $(PackagesOutDir)$(HostFxrCompressedFile) ."
+    <Exec Command="tar -C $(HostFxrPublishRoot) -czf $(AssetOutputPath)$(HostFxrCompressedFile) ."
           IgnoreExitCode="true"
           IgnoreStandardErrorWarningFormat="true" />
-    <Exec Command="tar -C $(SharedFrameworkPublishRoot) -czf $(PackagesOutDir)$(SharedFrameworkCompressedFile) ."
+    <Exec Command="tar -C $(SharedFrameworkPublishRoot) -czf $(AssetOutputPath)$(SharedFrameworkCompressedFile) ."
           IgnoreExitCode="true"
           IgnoreStandardErrorWarningFormat="true" />
-    <Exec Command="tar -C $(SharedFrameworkPublishSymbolsDir) -czf $(PackagesOutDir)$(SharedFrameworkSymbolsCompressedFile) ."
+    <Exec Command="tar -C $(SharedFrameworkPublishSymbolsDir) -czf $(AssetOutputPath)$(SharedFrameworkSymbolsCompressedFile) ."
           IgnoreExitCode="true"
           IgnoreStandardErrorWarningFormat="true" />
-    <Error Condition="!Exists('$(PackagesOutDir)$(CombinedCompressedFile)')" Message="Unable to create $(PackagesOutDir)$(CombinedCompressedFile)" />
-    <Error Condition="!Exists('$(PackagesOutDir)$(HostFxrCompressedFile)')" Message="Unable to create $(PackagesOutDir)$(HostFxrCompressedFile)" />
-    <Error Condition="!Exists('$(PackagesOutDir)$(SharedFrameworkCompressedFile)')" Message="Unable to create $(PackagesOutDir)$(SharedFrameworkCompressedFile)" />
-    <Error Condition="!Exists('$(PackagesOutDir)$(SharedFrameworkSymbolsCompressedFile)')" Message="Unable to create $(PackagesOutDir)$(SharedFrameworkSymbolsCompressedFile)" />
+    <Error Condition="!Exists('$(AssetOutputPath)$(CombinedCompressedFile)')" Message="Unable to create $(PackagesOutDir)$(CombinedCompressedFile)" />
+    <Error Condition="!Exists('$(AssetOutputPath)$(HostFxrCompressedFile)')" Message="Unable to create $(PackagesOutDir)$(HostFxrCompressedFile)" />
+    <Error Condition="!Exists('$(AssetOutputPath)$(SharedFrameworkCompressedFile)')" Message="Unable to create $(PackagesOutDir)$(SharedFrameworkCompressedFile)" />
+    <Error Condition="!Exists('$(AssetOutputPath)$(SharedFrameworkSymbolsCompressedFile)')" Message="Unable to create $(PackagesOutDir)$(SharedFrameworkSymbolsCompressedFile)" />
   </Target>
 
   <Import Project="windows\package.targets" />
     </ItemGroup>
 
     <PropertyGroup>
-      <PackArgs>--no-restore --no-build --output $(PackagesOutDir)</PackArgs>
+      <PackArgs>--no-restore --no-build --output $(PackageOutputPath)</PackArgs>
       <PackArgs>$(PackArgs) $(MSBuildPassThroughPropertyList) /p:BaseOutputPath=$(IntermediateOutputForPackaging)</PackArgs>
     </PropertyGroup>
 
index 36985af..a41f948 100644 (file)
@@ -39,7 +39,7 @@
     <!-- Specify a separate 'packages' directory in case we are building an already built version of Microsoft.NETCore.App and the $(PackagesDir)
          already contains the same version as we are building.  (ex. building source-build for `2.0.0` when `2.0.0` has already shipped.
     -->
-    <Exec Command="$(DotnetRestoreCommandNoPackages) --source $(PackagesOutDir) --packages $(SharedFrameworkIntermediatePackagesDir) $(CommonSharedFrameworkArgs)"
+    <Exec Command="$(DotnetRestoreCommandNoPackages) --source $(PackageOutputPath) --packages $(SharedFrameworkIntermediatePackagesDir) $(CommonSharedFrameworkArgs)"
           WorkingDirectory="$(SharedFrameworkSourceRoot)" />
 
     <!-- We publish to a sub folder of the PublishRoot so tools like heat and zip can generate folder structures easier. -->
     <!-- Specify a separate 'packages' directory in case we are building an already built version of Microsoft.NETCore.DotNetHost and the $(PackagesDir)
          already contains the same version as we are building.  (ex. building source-build for `2.0.0` when `2.0.0` has already shipped.
     -->
-    <Exec Command="$(DotnetRestoreCommandNoPackages) --source $(PackagesOutDir) --packages $(SharedFrameworkIntermediatePackagesDir) $(CommonLockedHostArgs)"
+    <Exec Command="$(DotnetRestoreCommandNoPackages) --source $(PackageOutputPath) --packages $(SharedFrameworkIntermediatePackagesDir) $(CommonLockedHostArgs)"
           WorkingDirectory="$(LockedHostSourceRoot)" />
 
     <Exec Command="$(DotnetToolCommand) publish --no-restore --output $(CoreHostLockedDir) $(CommonLockedHostArgs)"