Skip to content

Commit 4a7afd7

Browse files
Merge pull request #2099 from swiftwasm/katei/fix-installer
Fix postinstall script for 5.3
2 parents b6c5153 + 7360790 commit 4a7afd7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

utils/darwin-installer-scripts/postinstall

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313

1414
INSTALLED_TOOLCHAIN=$2
1515

16-
ln -fs "${INSTALLED_TOOLCHAIN}" "${INSTALLED_TOOLCHAIN%/*}/swift-latest"
16+
ln -fs "${INSTALLED_TOOLCHAIN}" "${INSTALLED_TOOLCHAIN%/*}/swift-latest.xctoolchain"

utils/webassembly/distribute-latest-toolchain.sh

+4-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ github() {
1717
curl --header "authorization: Bearer $GITHUB_TOKEN" "$@"
1818
}
1919

20-
latest_run=$(github "${gh_api}/repos/${repository}/actions/workflows/${workflow_name}/runs?head_branch=${branch}&status=completed&conclusion=success" \
20+
latest_run=$(github "${gh_api}/repos/${repository}/actions/workflows/${workflow_name}/runs?head_branch=${branch}&status=success" \
2121
| jq ".workflow_runs | map(select(.head_branch == \"$branch\")) | sort_by(.run_number) | last")
2222

2323
if [ -z "$latest_run" ] || [ "$latest_run" == "null" ]; then
@@ -28,7 +28,6 @@ fi
2828
artifacts_url=$(echo $latest_run | jq .artifacts_url --raw-output)
2929
head_sha=$(echo $latest_run | jq .head_sha --raw-output)
3030

31-
3231
get_artifact_url() {
3332
local name=$1
3433
github $artifacts_url --fail | jq ".artifacts[] | select(.name == \"$name\") | .archive_download_url" | sed 's/\"//g'
@@ -112,16 +111,16 @@ sign_toolchain() {
112111
fi
113112
done
114113

115-
${codesign_bin} "${codesign_args[@]}" "${darwin_toolchain}/usr/"
114+
${codesign_bin} "${codesign_args[@]}" "${darwin_toolchain}/"
116115
}
117116

118117
create_installer() {
119118
local darwin_toolchain=$1
120119
local darwin_toolchain_name=$(basename "$darwin_toolchain")
121120
local darwin_toolchain_installer_package="$darwin_toolchain.pkg"
122121
local darwin_toolchain_install_location="/Library/Developer/Toolchains/${darwin_toolchain_name}.xctoolchain"
123-
local darwin_toolchain_version=$(/usr/libexec/PlistBuddy -c "Print Version string" "$darwin_toolchain"/usr/Info.plist)
124-
local darwin_toolchain_bundle_identifier=$(/usr/libexec/PlistBuddy -c "Print CFBundleIdentifier string" "$darwin_toolchain"/usr/Info.plist)
122+
local darwin_toolchain_version=$(/usr/libexec/PlistBuddy -c "Print Version string" "$darwin_toolchain"/Info.plist)
123+
local darwin_toolchain_bundle_identifier=$(/usr/libexec/PlistBuddy -c "Print CFBundleIdentifier string" "$darwin_toolchain"/Info.plist)
125124

126125
"${swift_source_dir}/utils/toolchain-installer" "${darwin_toolchain}/" "${darwin_toolchain_bundle_identifier}" \
127126
"${DARWIN_TOOLCHAIN_INSTALLER_CERT}" "${darwin_toolchain_installer_package}" "${darwin_toolchain_install_location}" \

0 commit comments

Comments
 (0)