Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .pipelines/templates/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ jobs:
$psOptPath = "$(OB_OUTPUTDIRECTORY)/psoptions.json"
Save-PSOptions -PSOptionsPath $psOptPath

$entitlements = "$(PowerShellRoot)/assets/macos-entitlements.plist"
$pwshBin = "$(OB_OUTPUTDIRECTORY)/pwsh"
Write-Verbose -Verbose "Applying entitlements to $pwshBin"
codesign --sign - --force --options runtime --entitlements $entitlements $pwshBin
if ($LASTEXITCODE -ne 0) {
Comment on lines +72 to +76
throw "codesign failed with exit code $LASTEXITCODE"
}

Comment on lines +72 to +79
# Since we are using custom pool for macOS, we need to use artifact.upload to publish the artifacts
Write-Host "##vso[artifact.upload containerfolder=$artifactName;artifactname=$artifactName]$(OB_OUTPUTDIRECTORY)"

Expand Down
14 changes: 14 additions & 0 deletions assets/macos-entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
Comment on lines +8 to +12
</dict>
</plist>
Loading