Fix invalid blob paths when pushing the build to Azure blob storage (#5968)
This commit is contained in:
parent
55b8818540
commit
e21fe567b2
|
|
@ -10,53 +10,43 @@
|
||||||
|
|
||||||
<Target Name="Publish" DependsOnTargets="$(PublishDependsOn)" />
|
<Target Name="Publish" DependsOnTargets="$(PublishDependsOn)" />
|
||||||
|
|
||||||
<Target Name="GetFilesToPublish" DependsOnTargets="GetArtifactInfo">
|
<Target Name="GetFilesToPublish">
|
||||||
<PropertyGroup>
|
|
||||||
<BlobBasePath>aspnetcore/Runtime/$(PackageVersion)/</BlobBasePath>
|
|
||||||
<NpmBlobBasePath>aspnetcore/npm/$(PackageVersion)/</NpmBlobBasePath>
|
|
||||||
<JarBlobBasePath>aspnetcore/jar/$(PackageVersion)/</JarBlobBasePath>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- Installer output files with specific metadata. -->
|
<!-- Installer output files with specific metadata. -->
|
||||||
<FilesToPublish Include="$(InstallersOutputPath)*.txt">
|
<_FilesToPublish Include="$(InstallersOutputPath)*.txt">
|
||||||
<RelativeBlobPath>$(BlobBasePath)%(FileName)%(Extension)</RelativeBlobPath>
|
|
||||||
<ContentType>text/plain</ContentType>
|
<ContentType>text/plain</ContentType>
|
||||||
</FilesToPublish>
|
</_FilesToPublish>
|
||||||
|
|
||||||
<FilesToPublish Include="$(InstallersOutputPath)*.version">
|
<_FilesToPublish Include="$(InstallersOutputPath)*.version">
|
||||||
<RelativeBlobPath>$(BlobBasePath)%(FileName)%(Extension)</RelativeBlobPath>
|
|
||||||
<ContentType>text/plain</ContentType>
|
<ContentType>text/plain</ContentType>
|
||||||
<CacheControl>no-cache, no-store, must-revalidate</CacheControl>
|
<CacheControl>no-cache, no-store, must-revalidate</CacheControl>
|
||||||
<Overwrite>true</Overwrite>
|
</_FilesToPublish>
|
||||||
</FilesToPublish>
|
|
||||||
|
|
||||||
<FilesToPublish Include="$(InstallersOutputPath)*.svg">
|
<_FilesToPublish Include="$(InstallersOutputPath)*.svg">
|
||||||
<RelativeBlobPath>$(BlobBasePath)%(FileName)%(Extension)</RelativeBlobPath>
|
|
||||||
<CacheControl>no-cache, no-store, must-revalidate</CacheControl>
|
<CacheControl>no-cache, no-store, must-revalidate</CacheControl>
|
||||||
<ContentType>image/svg+xml</ContentType>
|
<ContentType>image/svg+xml</ContentType>
|
||||||
<Overwrite>true</Overwrite>
|
</_FilesToPublish>
|
||||||
</FilesToPublish>
|
|
||||||
|
|
||||||
<!-- All other installer files. -->
|
<!-- All other installer files. -->
|
||||||
<FilesToPublish Include="$(InstallerOutputPath)*" Exclude="@(FilesToPublish)">
|
<_FilesToPublish Include="$(InstallersOutputPath)*" Exclude="@(_FilesToPublish)" />
|
||||||
<RelativeBlobPath>$(BlobBasePath)%(FileName)%(Extension)</RelativeBlobPath>
|
|
||||||
</FilesToPublish>
|
|
||||||
|
|
||||||
<!-- Java packages -->
|
<!-- Java packages -->
|
||||||
<FilesToPublish Include="$(ProductPackageOutputPath)*.jar">
|
<_FilesToPublish Include="$(ProductPackageOutputPath)*.jar;$(ProductPackageOutputPath)*.pom">
|
||||||
<RelativeBlobPath>$(JarBlobBasePath)%(FileName)%(Extension)</RelativeBlobPath>
|
<BlobBasePath>aspnetcore/jar/$(PackageVersion)/</BlobBasePath>
|
||||||
</FilesToPublish>
|
</_FilesToPublish>
|
||||||
|
|
||||||
<FilesToPublish Include="$(ProductPackageOutputPath)*.pom">
|
<!--
|
||||||
<RelativeBlobPath>$(JarBlobBasePath)%(FileName)%(Extension)</RelativeBlobPath>
|
Transform the intermediate item group into the final group.
|
||||||
|
You can't use globbing _and_ set metadata using FileName and Extension at the same time. MSBuild quirks are fun.
|
||||||
|
-->
|
||||||
|
<FilesToPublish Include="@(_FilesToPublish)">
|
||||||
|
<RelativeBlobPath Condition="'%(_FilesToPublish.BlobBasePath)' != ''">%(_FilesToPublish.BlobBasePath)%(_FilesToPublish.FileName)%(_FilesToPublish.Extension)</RelativeBlobPath>
|
||||||
|
<RelativeBlobPath Condition="'%(_FilesToPublish.BlobBasePath)' == ''">aspnetcore/Runtime/$(PackageVersion)/%(_FilesToPublish.FileName)%(_FilesToPublish.Extension)</RelativeBlobPath>
|
||||||
</FilesToPublish>
|
</FilesToPublish>
|
||||||
|
<_FilesToPublish Remove="@(_FilesToPublish)" />
|
||||||
|
|
||||||
<!-- NPM packages -->
|
<!-- NPM packages -->
|
||||||
<NpmPackagesToPublish Include="$(ProductPackageOutputPath)*.tgz">
|
<NpmPackageToPublish Include="$(ProductPackageOutputPath)*.tgz" />
|
||||||
<RelativeBlobPath>$(NpmBlobBasePath)%(FileName)%(Extension)</RelativeBlobPath>
|
|
||||||
<ContentType>application/tar+gzip</ContentType>
|
|
||||||
</NpmPackagesToPublish>
|
|
||||||
|
|
||||||
<PackagesToPublish Include="$(ProductPackageOutputPath)*.symbols.nupkg" IsSymbolsPackage="true" />
|
<PackagesToPublish Include="$(ProductPackageOutputPath)*.symbols.nupkg" IsSymbolsPackage="true" />
|
||||||
<PackagesToPublish Include="$(ProductPackageOutputPath)*.nupkg" Exclude="@(PackagesToPublish)" />
|
<PackagesToPublish Include="$(ProductPackageOutputPath)*.nupkg" Exclude="@(PackagesToPublish)" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue