mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 11:17:53 +01:00
[ci] Fix release pipeline installers hash generator (#25270)
* Fix Calculating SHA256 hash step * Separate user/machine files
This commit is contained in:
@@ -376,25 +376,6 @@ jobs:
|
|||||||
SourceFolder: $(Build.ArtifactStagingDirectory)/Symbols-$(BuildPlatform)/
|
SourceFolder: $(Build.ArtifactStagingDirectory)/Symbols-$(BuildPlatform)/
|
||||||
RemoveSourceFolder: True
|
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
|
- template: installer-steps.yml
|
||||||
parameters:
|
parameters:
|
||||||
versionNumber: ${{ parameters.versionNumber }}
|
versionNumber: ${{ parameters.versionNumber }}
|
||||||
@@ -431,6 +412,34 @@ jobs:
|
|||||||
flattenFolders: True
|
flattenFolders: True
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
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
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: "Publish Artifact: PowerToySetup"
|
displayName: "Publish Artifact: PowerToySetup"
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
Reference in New Issue
Block a user