Insert macOS file association metadata during bundle process
This commit is contained in:
parent
e8cea130a4
commit
4d73d4b1b9
2 changed files with 70 additions and 1 deletions
|
@ -22,7 +22,7 @@ cargo build --release --package cli --target x86_64-apple-darwin
|
|||
|
||||
echo "Creating application bundle"
|
||||
pushd crates/zed
|
||||
channel=$(cat RELEASE_CHANNEL)
|
||||
channel=$(<RELEASE_CHANNEL)
|
||||
cp Cargo.toml Cargo.toml.backup
|
||||
sed \
|
||||
-i .backup \
|
||||
|
@ -49,6 +49,13 @@ echo "Copying WebRTC.framework into the frameworks folder"
|
|||
mkdir "${app_path}/Contents/Frameworks"
|
||||
cp -R target/x86_64-apple-darwin/release/WebRTC.framework "${app_path}/Contents/Frameworks/"
|
||||
|
||||
mv "${app_path}/Contents/Info.plist" "${app_path}/Contents/WithoutDocumentTypes.plist"
|
||||
awk \
|
||||
"/<\/dict>/{while(getline line<\"./crates/zed/BundleDocumentTypes.plist\"){print line}}1" \
|
||||
"${app_path}/Contents/WithoutDocumentTypes.plist" \
|
||||
> "${app_path}/Contents/Info.plist"
|
||||
rm "${app_path}/Contents/WithoutDocumentTypes.plist"
|
||||
|
||||
if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTARIZATION_USERNAME && -n $APPLE_NOTARIZATION_PASSWORD ]]; then
|
||||
echo "Signing bundle with Apple-issued certificate"
|
||||
security create-keychain -p "$MACOS_CERTIFICATE_PASSWORD" zed.keychain || echo ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue