History

New entitlements: (#3118)

Release Notes: - Support Universal Links for Channel links - Share credentials between Stable and Preview

Conrad Irwin committed 3 years ago

Commit b168bde2 parents 247cdb1 c12f0d25 files · +26 −10Browse files

Unified · Split

5 files
  1. crates/zed/contents/dev/embedded.provisionprofile +0 −0
  2. crates/zed/contents/preview/embedded.provisionprofile +0 −0
  3. crates/zed/contents/stable/Zed_Stable_Provisioning_Profile.provisionprofile +0 −0
  4. crates/zed/resources/zed.entitlements +4 −8
  5. script/bundle +25 −5
crates/zed/contents/dev/embedded.provisionprofile+0−0

Binary file not shown.

crates/zed/contents/preview/embedded.provisionprofile+0−0

Binary file not shown.

crates/zed/contents/stable/Zed_Stable_Provisioning_Profile.provisionprofile+0−0

Binary file not shown.

crates/zed/resources/zed.entitlements+4−8
@@ -2,6 +2,8 @@ · 1 unmodified line
2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3<plist version="1.0">3<plist version="1.0">
4<dict>4<dict>
5 <key>com.apple.developer.associated-domains</key>
6 <array><string>applinks:zed.dev</string></array>
5 <key>com.apple.security.automation.apple-events</key>7 <key>com.apple.security.automation.apple-events</key>
6 <true/>8 <true/>
7 <key>com.apple.security.cs.allow-jit</key>9 <key>com.apple.security.cs.allow-jit</key>
@@ -10,14 +12,8 @@ · 2 unmodified lines
10 <true/>12 <true/>
11 <key>com.apple.security.device.camera</key>13 <key>com.apple.security.device.camera</key>
12 <true/>14 <true/>
13 <key>com.apple.security.personal-information.addressbook</key>15 <key>com.apple.security.keychain-access-groups</key>
14 <true/>16 <array><string>MQ55VZLNZQ.dev.zed.Shared</string></array>
15 <key>com.apple.security.personal-information.calendars</key>
16 <true/>
17 <key>com.apple.security.personal-information.location</key>
18 <true/>
19 <key>com.apple.security.personal-information.photos-library</key>
20 <true/>
21 <!-- <key>com.apple.security.cs.disable-library-validation</key>17 <!-- <key>com.apple.security.cs.disable-library-validation</key>
22 <true/> -->18 <true/> -->
23</dict>19</dict>
script/bundle+25−5
@@ -134,6 +134,8 @@ else · 133 unmodified lines
134 cp -R target/${target_dir}/WebRTC.framework "${app_path}/Contents/Frameworks/"134 cp -R target/${target_dir}/WebRTC.framework "${app_path}/Contents/Frameworks/"
135fi135fi
136 136
137cp crates/zed/contents/$channel/embedded.provisionprofile "${app_path}/Contents/"
138
137if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTARIZATION_USERNAME && -n $APPLE_NOTARIZATION_PASSWORD ]]; then139if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTARIZATION_USERNAME && -n $APPLE_NOTARIZATION_PASSWORD ]]; then
138 echo "Signing bundle with Apple-issued certificate"140 echo "Signing bundle with Apple-issued certificate"
139 security create-keychain -p "$MACOS_CERTIFICATE_PASSWORD" zed.keychain || echo ""141 security create-keychain -p "$MACOS_CERTIFICATE_PASSWORD" zed.keychain || echo ""
@@ -143,14 +145,32 @@ if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTAR · 3 unmodified lines
143 security import /tmp/zed-certificate.p12 -k zed.keychain -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign145 security import /tmp/zed-certificate.p12 -k zed.keychain -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
144 rm /tmp/zed-certificate.p12146 rm /tmp/zed-certificate.p12
145 security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CERTIFICATE_PASSWORD" zed.keychain147 security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CERTIFICATE_PASSWORD" zed.keychain
146 /usr/bin/codesign --force --deep --timestamp --options runtime --entitlements crates/zed/resources/zed.entitlements --sign "Zed Industries, Inc." "${app_path}" -v148
149 # sequence of codesign commands modeled after this example: https://developer.apple.com/forums/thread/701514
150 /usr/bin/codesign --force --timestamp --sign "Zed Industries, Inc." "${app_path}/Contents/Frameworks/WebRTC.framework" -v
151 /usr/bin/codesign --force --timestamp --options runtime --sign "Zed Industries, Inc." "${app_path}/Contents/MacOS/cli" -v
152 /usr/bin/codesign --force --timestamp --options runtime --entitlements crates/zed/resources/zed.entitlements --sign "Zed Industries, Inc." "${app_path}" -v
153
147 security default-keychain -s login.keychain154 security default-keychain -s login.keychain
148else155else
149 echo "One or more of the following variables are missing: MACOS_CERTIFICATE, MACOS_CERTIFICATE_PASSWORD, APPLE_NOTARIZATION_USERNAME, APPLE_NOTARIZATION_PASSWORD"156 echo "One or more of the following variables are missing: MACOS_CERTIFICATE, MACOS_CERTIFICATE_PASSWORD, APPLE_NOTARIZATION_USERNAME, APPLE_NOTARIZATION_PASSWORD"
150 echo "Performing an ad-hoc signature, but this bundle should not be distributed"157 if [[ "$local_only" = false ]]; then
151 echo "If you see 'The application cannot be opened for an unexpected reason,' you likely don't have the necessary entitlements to run the application in your signing keychain"158 echo "To create a self-signed local build use ./scripts/build.sh -ldf"
152 echo "You will need to download a new signing key from developer.apple.com, add it to keychain, and export MACOS_SIGNING_KEY=<email address of signing key>"159 exit 1
153 codesign --force --deep --entitlements crates/zed/resources/zed.entitlements --sign ${MACOS_SIGNING_KEY:- -} "${app_path}" -v160 fi
161
162 echo "====== WARNING ======"
163 echo "This bundle is being signed without all entitlements, some features (e.g. universal links) will not work"
164 echo "====== WARNING ======"
165
166 # NOTE: if you need to test universal links you have a few paths forward:
167 # - create a PR and tag it with the `run-build-dmg` label, and download the .dmg file from there.
168 # - get a signing key for the MQ55VZLNZQ team from Nathan.
169 # - create your own signing key, and update references to MQ55VZLNZQ to your own team ID
170 # then comment out this line.
171 cat crates/zed/resources/zed.entitlements | sed '/com.apple.developer.associated-domains/,+1d' > "${app_path}/Contents/Resources/zed.entitlements"
172
173 codesign --force --deep --entitlements "${app_path}/Contents/Resources/zed.entitlements" --sign ${MACOS_SIGNING_KEY:- -} "${app_path}" -v
154fi174fi
155 175
156if [[ "$target_dir" = "debug" && "$local_only" = false ]]; then176if [[ "$target_dir" = "debug" && "$local_only" = false ]]; then

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t