Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 9c89f88

Browse files
committed
Fix issue with signing report remaining in zip
1 parent 003e20d commit 9c89f88

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.azure-pipelines/powershell/BuildTools.psm1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function Get-ZipName {
1919
[string]
2020
$RuntimeIdentifier = "unknown"
2121
)
22-
$version = Get-Version $BranchOrTagName
22+
$version = Get-Version $BranchOrTagName
2323
return "$FileNameTemplate" -f "$RuntimeIdentifier","$version"
2424
}
2525

@@ -137,11 +137,15 @@ function Compress-SignedFiles {
137137
return
138138
}
139139

140-
if ($ReportDir -and (Test-Path -Path "$ReportDir/*.md")) {
140+
if ($ReportDir -and (Test-Path -Path "$SourceDir/*.md")) {
141+
if (-Not (Test-Path -Path $ReportDir)) {
142+
New-Item $ReportDir -ItemType Directory
143+
}
144+
141145
Write-Information "Moving signing report to $ReportDir"
142-
Move-Item -Path "$SourceDir/*.md" -Destination $ReportDir
146+
Move-Item -Path "$SourceDir/*.md" -Destination $ReportDir/
143147
}
144-
148+
145149
$parentDir = Split-Path -Path $SourceDir -Parent -Resolve
146150
$backupDir = Join-Path -Path $parentDir -ChildPath backup
147151

.azure-pipelines/templates/prepare-unsigned-executable-darwin.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ steps:
5252
security import $(agent.tempdirectory)/cert.p12 -k $(agent.tempdirectory)/buildagent.keychain -P "$(graph-cli-apple-developer-certificate-password)" -T /usr/bin/codesign
5353
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd $(agent.tempdirectory)/buildagent.keychain
5454
codesign -s $(CERTIFICATE_NAME) --deep --force --options runtime --entitlements .azure-pipelines/darwin/entitlements.plist $(EXECUTABLE_PATH)/$(EXECUTABLE_NAME)
55+
chmod u+x $(EXECUTABLE_PATH)/$(EXECUTABLE_NAME)
5556
displayName: Set Hardened Entitlements
5657
condition: and(succeeded(), startsWith(variables['TARGET_RUNTIME'], 'osx'))
57-
58+
5859
- script: |
5960
set -e
6061
pushd $(EXECUTABLE_PATH) && zip -r -X $(EXECUTABLE_PATH)/$(ZIP_NAME) * && rm $(EXECUTABLE_NAME) && popd
6162
displayName: Archive build for submission
62-
condition: and(succeeded(), startsWith(variables['TARGET_RUNTIME'], 'osx'))
63+
condition: and(succeeded(), startsWith(variables['TARGET_RUNTIME'], 'osx'))

0 commit comments

Comments
 (0)