Skip to content

Commit

Permalink
Fixing the dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
soninaren committed May 1, 2020
1 parent 8d1aa8a commit 4da3664
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
27 changes: 3 additions & 24 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down
19 changes: 19 additions & 0 deletions generateSha.ps1
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 4da3664

Please sign in to comment.