Rework relative binary paths
authorMatt Mitchell <mmitche@microsoft.com>
Thu, 5 Apr 2018 16:30:17 +0000 (09:30 -0700)
committerWes Haggard <Wes.Haggard@microsoft.com>
Fri, 6 Apr 2018 03:24:39 +0000 (20:24 -0700)
Commit migrated from https://github.com/dotnet/core-setup/commit/f6ba4d8c22cb8f9dcc5a205f3915d663e128d431

src/installer/publish/dir.targets
src/installer/publish/publish-type.proj
src/installer/signing/dir.props
src/installer/signing/validation.targets

index 6abd260..8883cc3 100644 (file)
                                    UploadJsonFilename="%(DebInstallerFile.UploadJsonFilename)"
                                    PackageName="%(DebInstallerFile.PackageName)"
                                    PackageVersion="$(SharedFrameworkNugetVersion)"
-                                   UploadUrl="$(BaseUrl)$(ContainerName)/Runtime/$(SharedFrameworkNugetVersion)/%(DebInstallerFile.Filename)%(DebInstallerFile.Extension)" />
+                                   UploadUrl="$(BaseUrl)$(ContainerName)/$(BinariesRelativePath)%(DebInstallerFile.Filename)%(DebInstallerFile.Extension)" />
   </Target>
 
   <Target Name="CheckIfAllBuildsHavePublished">
     <ListAzureBlobs AccountName="$(AzureAccountName)"
                       AccountKey="$(AzureAccessToken)"
                       ContainerName="$(ContainerName)"
-                      FilterBlobNames="Runtime/$(SharedFrameworkNugetVersion)/">
+                      FilterBlobNames="$(BinariesRelativePath)">
       <Output TaskParameter="BlobNames" ItemName="_BlobNames" />
     </ListAzureBlobs>
     <ItemGroup>
index 4ed9a10..dc16771 100644 (file)
     <!-- TODO: We should also think about pulling down the checksums or recomputing them -->
     <PropertyGroup>
       <DownloadDirectory Condition="'$(DownloadDirectory)' == ''">$(BinDir)PackageDownload/</DownloadDirectory>
-      <!-- Must add a / suffix or else a stable build will end up downloading too much (e.g. everything prefixed with 2.1.0-preview2) -->
-      <DownloadBlobNamePrefix>$(BinariesRelativePath)/</DownloadBlobNamePrefix>
     </PropertyGroup>
 
     <MakeDir Directories="$(DownloadDirectory)" Condition="!Exists('$(DownloadDirectory)')" />
 
-    <Message Text="Downloading files from $(AzureAccountName)/$(ContainerName)/$(DownloadBlobNamePrefix) into $(DownloadDirectory)" />
+    <Message Text="Downloading files from $(AzureAccountName)/$(ContainerName)/$(BinariesRelativePath) into $(DownloadDirectory)" />
 
     <DownloadFromAzure AccountName="$(AzureAccountName)"
                        AccountKey="$(AzureAccessToken)"
                        ContainerName="$(ContainerName)"
-                       BlobNamePrefix="$(DownloadBlobNamePrefix)"
+                       BlobNamePrefix="$(BinariesRelativePath)"
                        DownloadDirectory="$(DownloadDirectory)" />
 
     <ItemGroup>
@@ -72,7 +70,7 @@
 
       <!-- Make the local relative path match what dotnet-install scripts expect -->
       <FilesToPublish>
-        <RelativeBlobPath>assets/$(BinariesRelativePath)/$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
+        <RelativeBlobPath>assets/$(BinariesRelativePath)$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
         <ManifestArtifactData>ShipInstaller=dotnetcli</ManifestArtifactData>
       </FilesToPublish>
     </ItemGroup>
index 0b09f93..133d6c2 100644 (file)
@@ -10,7 +10,5 @@
 
     <BinInspectCommand>$(PackagesDir)microsoft.dotnet.bininspector\1.0.0-alpha-00001\lib\BinInspect.exe</BinInspectCommand>
     <BinInspectResultsXml>$(LogDirectory)SignResults.xml</BinInspectResultsXml>
-
-    <FilterBlobNames>$(BinariesRelativePath)/</FilterBlobNames>
   </PropertyGroup>
 </Project>
\ No newline at end of file
index 92d1fcb..ef010a2 100644 (file)
@@ -16,7 +16,7 @@
     <ListAzureBlobs AccountName="$(AzureAccountName)"
                       AccountKey="$(AzureAccessToken)"
                       ContainerName="$(ContainerName)"
-                      FilterBlobNames="$(FilterBlobNames)">
+                      FilterBlobNames="$(BinariesRelativePath)">
       <Output TaskParameter="BlobNames" ItemName="_BlobList" />
     </ListAzureBlobs>
   </Target>
@@ -62,7 +62,7 @@
                            AccountKey="$(AzureAccessToken)"
                            ContainerName="$(ContainerName)"
                            BlobNames="@(DownloadArtifact)"
-                           BlobNamePrefix="$(FilterBlobNames)"
+                           BlobNamePrefix="$(BinariesRelativePath)"
                            DownloadDirectory="$(DownloadDirectory)" />
   </Target>