Skip to content

Commit 2ebef22

Browse files
Add --asc-provider option for package notarization
1 parent 33617e2 commit 2ebef22

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

utils/webassembly/distribute-latest-toolchain.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,18 @@ create_installer() {
152152
"${darwin_toolchain_version}" "${swift_source_dir}/utils/darwin-installer-scripts"
153153

154154
# Notarize the toolchain installer
155-
local request_output=$(xcrun altool --notarize-app --type osx \
156-
--file "${darwin_toolchain_installer_package}" \
157-
--primary-bundle-id "${darwin_toolchain_bundle_identifier}" \
158-
-u "${DARWIN_TOOLCHAIN_NOTARIZE_EMAIL}" \
159-
-p "@env:DARWIN_TOOLCHAIN_NOTARIZE_PASSWORD")
155+
local notarize_command=("xcrun" "altool" "--notarize-app" "--type" "osx" \
156+
"--file" "${darwin_toolchain_installer_package}" \
157+
"--primary-bundle-id" "${darwin_toolchain_bundle_identifier}" \
158+
"-u" "${DARWIN_TOOLCHAIN_NOTARIZE_EMAIL}" \
159+
"-p" "@env:DARWIN_TOOLCHAIN_NOTARIZE_PASSWORD")
160+
161+
if [ -n "${DARWIN_TOOLCHAIN_NOTARIZE_TEAM_ID}" ]; then
162+
notarize_command=("${notarize_command[@]}" "--asc-provider" "${DARWIN_TOOLCHAIN_NOTARIZE_TEAM_ID}")
163+
fi
164+
165+
local request_output=$(${notarize_command[@]})
166+
160167
local request_uuid=$(echo "$request_output" | grep "RequestUUID = " | awk '{print $3}')
161168

162169
local request_status=$(xcrun altool --notarization-info "$request_uuid" \

0 commit comments

Comments
 (0)