Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix bundle script
Mikayla70d0421b3ca2
diff --git a/.github/workflows/release_nightly.yml b/.github/workflows/release_nightly.ymlindex 99506db9762..447e928866d 100644--- a/.github/workflows/release_nightly.yml+++ b/.github/workflows/release_nightly.yml@@ -92,7 +92,7 @@ jobs:run: script/generate-licenses- name: Create app bundle- run: script/bundle+ run: script/bundle -2- name: Upload Zed Nightlyrun: script/upload-nightlydiff --git a/crates/zed/contents/nightly/embedded.provisionprofile b/crates/zed/contents/nightly/embedded.provisionprofilenew file mode 100644index 00000000000..8979e1fb9fbBinary files /dev/null and b/crates/zed/contents/nightly/embedded.provisionprofile differdiff --git a/crates/zed2/Cargo.toml b/crates/zed2/Cargo.tomlindex ec665e5f421..edc1123698e 100644--- a/crates/zed2/Cargo.toml+++ b/crates/zed2/Cargo.toml@@ -167,13 +167,12 @@ osx_info_plist_exts = ["resources/info/*"]osx_url_schemes = ["zed-dev"][package.metadata.bundle-nightly]-# TODO kb different icon?icon = ["resources/[email protected]", "resources/app-icon-preview.png"]-identifier = "dev.zed.Zed-Nightly"+identifier = "dev.zed.Zed-Dev"name = "Zed Nightly"osx_minimum_system_version = "10.15.7"osx_info_plist_exts = ["resources/info/*"]-osx_url_schemes = ["zed-nightly"]+osx_url_schemes = ["zed-dev"][package.metadata.bundle-preview]icon = ["resources/[email protected]", "resources/app-icon-preview.png"]diff --git a/crates/zed2/contents/nightly/embedded.provisionprofile b/crates/zed2/contents/nightly/embedded.provisionprofilenew file mode 100644index 00000000000..8979e1fb9fbBinary files /dev/null and b/crates/zed2/contents/nightly/embedded.provisionprofile differdiff --git a/script/bundle b/script/bundleindex 8c0b3fef87b..3a82d252997 100755--- a/script/bundle+++ b/script/bundle@@ -9,6 +9,7 @@ local_arch=falselocal_only=falseoverwrite_local_app=falsebundle_name=""+zed_crate="zed"# This must match the team in the provsiioning profile.APPLE_NOTORIZATION_TEAM="MQ55VZLNZQ"@@ -25,13 +26,11 @@ Options:-o Open the resulting DMG or the app itself in local mode.-f Overwrite the local app bundle if it exists.-h Display this help and exit.+ -2 Build zed 2 instead of zed 1."}-# If -o option is specified, the folder of the resulting dmg will be opened in finder-# If -d is specified, Zed will be compiled in debug mode and the application's path printed-# If -od or -do is specified Zed will be bundled in debug and the application will be run.-while getopts 'dlfoh' flag+while getopts 'dlfoh2' flagdocase "${flag}" ino) open_result=true;;@@ -51,6 +50,7 @@ dotarget_dir="debug";;f) overwrite_local_app=true;;+ 2) zed_crate="zed2";;h)help_infoexit 0@@ -83,16 +83,19 @@ local_target_triple=${host_line#*: }if [ "$local_arch" = true ]; thenecho "Building for local target only."- cargo build ${build_flag} --package zed+ cargo build ${build_flag} --package ${zed_crate}cargo build ${build_flag} --package clielseecho "Compiling zed binaries"- cargo build ${build_flag} --package zed --package cli --target aarch64-apple-darwin --target x86_64-apple-darwin+ cargo build ${build_flag} --package ${zed_crate} --package cli --target aarch64-apple-darwin --target x86_64-apple-darwinfiecho "Creating application bundle"pushd crates/zedchannel=$(<RELEASE_CHANNEL)+popd++pushd crates/${zed_crate}cp Cargo.toml Cargo.toml.backupsed \-i .backup \@@ -131,7 +134,8 @@ elsecp -R target/${target_dir}/WebRTC.framework "${app_path}/Contents/Frameworks/"fi-cp crates/zed/contents/$channel/embedded.provisionprofile "${app_path}/Contents/"+#todo!(The app identifier has been set to 'Dev', but the channel is nightly, RATIONALIZE ALL OF THIS MESS)+cp crates/${zed_crate}/contents/$channel/embedded.provisionprofile "${app_path}/Contents/"if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTARIZATION_USERNAME && -n $APPLE_NOTARIZATION_PASSWORD ]]; thenecho "Signing bundle with Apple-issued certificate"@@ -146,8 +150,8 @@ if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTAR# sequence of codesign commands modeled after this example: https://developer.apple.com/forums/thread/701514/usr/bin/codesign --deep --force --timestamp --sign "Zed Industries, Inc." "${app_path}/Contents/Frameworks/WebRTC.framework" -v/usr/bin/codesign --deep --force --timestamp --options runtime --sign "Zed Industries, Inc." "${app_path}/Contents/MacOS/cli" -v- /usr/bin/codesign --deep --force --timestamp --options runtime --entitlements crates/zed/resources/zed.entitlements --sign "Zed Industries, Inc." "${app_path}/Contents/MacOS/zed" -v- /usr/bin/codesign --force --timestamp --options runtime --entitlements crates/zed/resources/zed.entitlements --sign "Zed Industries, Inc." "${app_path}" -v+ /usr/bin/codesign --deep --force --timestamp --options runtime --entitlements crates/${zed_crate}/resources/zed.entitlements --sign "Zed Industries, Inc." "${app_path}/Contents/MacOS/zed" -v+ /usr/bin/codesign --force --timestamp --options runtime --entitlements crates/${zed_crate}/resources/zed.entitlements --sign "Zed Industries, Inc." "${app_path}" -vsecurity default-keychain -s login.keychainelse@@ -166,7 +170,7 @@ else# - get a signing key for the MQ55VZLNZQ team from Nathan.# - create your own signing key, and update references to MQ55VZLNZQ to your own team ID# then comment out this line.- cat crates/zed/resources/zed.entitlements | sed '/com.apple.developer.associated-domains/,+1d' > "${app_path}/Contents/Resources/zed.entitlements"+ cat crates/${zed_crate}/resources/zed.entitlements | sed '/com.apple.developer.associated-domains/,+1d' > "${app_path}/Contents/Resources/zed.entitlements"codesign --force --deep --entitlements "${app_path}/Contents/Resources/zed.entitlements" --sign ${MACOS_SIGNING_KEY:- -} "${app_path}" -vfi