Skip to content

Commit 01acc4e

Browse files
Compute sha512 for the zip container app files (dotnet#2910)
* Compute sha512 for the zip container app files * Fix sha512 filename * Make path generation more robust
1 parent 7548f44 commit 01acc4e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

eng/yarpapppack/Common.projitems

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,28 @@
2121

2222
<Target Name="Build" />
2323

24+
<PropertyGroup>
25+
<YarpArchiveBaseName>$([MSBuild]::NormalizeDirectory('$(YarpAppArtifactsOutputDir)', '$(YarpAppRuntime)'))reverse-proxy-$(YarpAppRuntime)</YarpArchiveBaseName>
26+
<YarpArchiveZipName>$(YarpArchiveBaseName).zip</YarpArchiveZipName>
27+
<YarpArchiveSha512Name>$(YarpArchiveZipName).sha512</YarpArchiveSha512Name>
28+
</PropertyGroup>
29+
2430
<Target Name="BeforeBuild" BeforeTargets="Build">
2531
<MSBuild Projects="../../src/Application/Yarp.Application.csproj" Targets="publish" Properties="Configuration=$(Configuration);Platform=$(Platform);TargetFramework=$(TargetFramework);RuntimeIdentifier=$(YarpAppRuntime)" />
2632

2733
<!-- After publishing the project, we ensure that the published assets get packed in the nuspec. -->
2834
<ItemGroup>
2935
<_PublishItems Include="$(ArtifactsBinDir)/Yarp.Application/$(Configuration)/$(TargetFramework)/$(YarpAppRuntime)/publish/**/*" />
3036
<None Include="@(_PublishItems)" Pack="true" PackagePath="tools/" />
37+
<GenerateChecksumItems Include="$(YarpArchiveZipName)">
38+
<DestinationPath>$(YarpArchiveSha512Name)</DestinationPath>
39+
</GenerateChecksumItems>
3140
</ItemGroup>
3241

3342
<MakeDir Directories="$(YarpAppArtifactsOutputDir)/$(YarpAppRuntime)" />
3443
<ZipDirectory
3544
SourceDirectory="$(ArtifactsBinDir)/Yarp.Application/$(Configuration)/$(TargetFramework)/$(YarpAppRuntime)/publish"
36-
DestinationFile="$(YarpAppArtifactsOutputDir)/$(YarpAppRuntime)/reverse-proxy-$(YarpAppRuntime).zip"
45+
DestinationFile="$(YarpArchiveZipName)"
3746
Overwrite="true" />
3847

3948
<!-- Throw an error if _PublishItems is empty. -->

0 commit comments

Comments
 (0)