[ci] Fix release pipeline installers hash generator (#25270)

* Fix Calculating SHA256 hash step

* Separate user/machine files
This commit is contained in:
Stefan Markovic
2023-04-10 09:23:29 +02:00
committed by GitHub
parent b83f03c058
commit ddbe5e3908

View File

@@ -376,25 +376,6 @@ jobs:
SourceFolder: $(Build.ArtifactStagingDirectory)/Symbols-$(BuildPlatform)/
RemoveSourceFolder: True
- task: PowerShell@2
displayName: 'Calculating SHA256 hash'
inputs:
targetType: 'inline'
script: |
$p = "$(System.ArtifactsDirectory)\";
$staging = "$(Build.ArtifactStagingDirectory)\"
$hash = ((get-item $p\*.exe | Get-FileHash).Hash);
$plat = "hash_$(BuildPlatform).txt";
$combinedPath = $staging + $plat;
echo $plat
echo $hash
echo $p
echo $combinedPath
$hash | out-file -filepath $combinedPath
pwsh: true
- template: installer-steps.yml
parameters:
versionNumber: ${{ parameters.versionNumber }}
@@ -431,6 +412,34 @@ jobs:
flattenFolders: True
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PowerShell@2
displayName: 'Calculating SHA256 hash'
inputs:
targetType: 'inline'
script: |
$p = "$(System.ArtifactsDirectory)\";
$staging = "$(Build.ArtifactStagingDirectory)\"
$userHash = ((get-item $p\PowerToysUserSetup*.exe | Get-FileHash).Hash);
$machineHash = ((get-item $p\PowerToysSetup*.exe | Get-FileHash).Hash);
$userPlat = "hash_user_$(BuildPlatform).txt";
$machinePlat = "hash_machine_$(BuildPlatform).txt";
$combinedUserPath = $staging + $userPlat;
$combinedMachinePath = $staging + $machinePlat;
echo $p
echo $userPlat
echo $userHash
echo $combinedUserPath
echo $machinePlat
echo $machineHash
echo $combinedMachinePath
$userHash | out-file -filepath $combinedUserPath
$machineHash | out-file -filepath $combinedMachinePath
pwsh: true
- task: PublishBuildArtifacts@1
displayName: "Publish Artifact: PowerToySetup"
inputs: