From 4da36643c32783a832094318afcd679fa9d76455 Mon Sep 17 00:00:00 2001 From: Naren Soni Date: Mon, 20 Apr 2020 13:09:29 -0700 Subject: [PATCH] Fixing the dev build --- azure-pipelines.yml | 27 +++------------------------ generateSha.ps1 | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 generateSha.ps1 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 50a00f242..a3a2aa9ec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -120,7 +120,7 @@ steps: condition: and(succeeded(),or (eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.SourceBranch'], 'refs/heads/release/3.0'))) - pwsh: | .\repackageBinaries.ps1 - displayName: Sign and repackage binaries + displayName: Repackage signed binaries env: AzureBlobSigningConnectionString: $(AzureBlobSigningConnectionString) BuildArtifactsStorage: $(BuildArtifactsStorage) @@ -134,29 +134,8 @@ steps: arguments: 'TestSignedArtifacts --signTest' displayName: 'Verify signed binaries' condition: and(succeeded(),or (eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.SourceBranch'], 'refs/heads/release/3.0'))) -- task: PowerShell@2 - inputs: - targetType: 'inline' - script: | - function GenerateSha([string]$filePath,[string]$artifactsPath, [string]$shaFileName) - { - $sha = (Get-FileHash $filePath).Hash.ToLower() - $shaPath = Join-Path $artifactsPath "$shaFileName.sha" - Out-File -InputObject $sha -Encoding ascii -FilePath $shaPath - } - - Set-Location ".\build" - - $artifactsPath = Resolve-Path "..\artifacts\" - $zipFilesSearchPath = Join-Path $artifactsPath "*.zip" - $zipFiles = Get-ChildItem -File $zipFilesSearchPath - - foreach($zipFile in $zipFiles) - { - $zipFullPath = $zipFile.FullName - $fileName = $zipFile.Name - GenerateSha $zipFullPath $artifactsPath $fileName - } +- pwsh: | + .\generateSha.ps1 displayName: 'Generate sha files' - task: PublishTestResults@2 inputs: diff --git a/generateSha.ps1 b/generateSha.ps1 new file mode 100644 index 000000000..10c9f6159 --- /dev/null +++ b/generateSha.ps1 @@ -0,0 +1,19 @@ +function GenerateSha([string]$filePath,[string]$artifactsPath, [string]$shaFileName) +{ +$sha = (Get-FileHash $filePath).Hash.ToLower() +$shaPath = Join-Path $artifactsPath "$shaFileName.sha2" +Out-File -InputObject $sha -Encoding ascii -FilePath $shaPath +} + +Set-Location ".\build" + +$artifactsPath = Resolve-Path "..\artifacts\" +$zipFilesSearchPath = Join-Path $artifactsPath "*.zip" +$zipFiles = Get-ChildItem -File $zipFilesSearchPath + +foreach($zipFile in $zipFiles) +{ + $zipFullPath = $zipFile.FullName + $fileName = $zipFile.Name + GenerateSha $zipFullPath $artifactsPath $fileName +} \ No newline at end of file