chore: singing
This commit is contained in:
1 parent
60156aba94
commit
c85f5785fd
2 files changed
+17
-7
No files matched your search
@@ -35,10 +35,12 @@ each rebuild, because the keychain ties access to the binary's signature.
|
||||
tool/bundle-macos.sh --install
|
||||
```
|
||||
|
||||
This builds a release `Musyx.app` (ad-hoc signed) into `target/release/bundle/`. With
|
||||
This builds a release `Musyx.app` into `target/release/bundle/`, signed with the
|
||||
`Developer ID Application` certificate of team `H33L24BGUH` and the hardened runtime. With
|
||||
`--install`, it also copies the app to `/Applications`. The icon comes from
|
||||
`crates/musyx/assets/icon/musyx.png`, which `tool/make_icon.py` draws. Each new build is a new
|
||||
code identity to the keychain, so macOS asks once to allow access to the saved sign-in.
|
||||
`crates/musyx/assets/icon/musyx.png`, which `tool/make_icon.py` draws. Set
|
||||
`MUSYX_SIGN_IDENTITY` to sign with another identity, or to `-` for an ad-hoc signature
|
||||
(each ad-hoc build is a new code identity, so macOS asks again for keychain access).
|
||||
|
||||
## Settings
|
||||
|
||||
|
||||
+12
-4
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds Musyx.app (release, ad-hoc signed) into target/release/bundle/.
|
||||
# Builds Musyx.app (release, Developer ID signed) into target/release/bundle/.
|
||||
# tool/bundle-macos.sh # build the bundle
|
||||
# tool/bundle-macos.sh --install # and copy it to /Applications
|
||||
# MUSYX_SIGN_IDENTITY picks another signing identity; "-" signs ad hoc.
|
||||
set -euo pipefail
|
||||
|
||||
root="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
@@ -9,6 +10,7 @@ cd "$root"
|
||||
|
||||
version="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)"
|
||||
bundle="target/release/bundle/Musyx.app"
|
||||
identity="${MUSYX_SIGN_IDENTITY:-Developer ID Application: Yuriy Panov (H33L24BGUH)}"
|
||||
|
||||
cargo build --release -p musyx
|
||||
|
||||
@@ -48,9 +50,15 @@ cat > "$bundle/Contents/Info.plist" <<PLIST
|
||||
</plist>
|
||||
PLIST
|
||||
|
||||
# Ad-hoc signature: enough to run locally. Each new build is a new identity to the
|
||||
# keychain, so macOS may ask once to allow access to the saved sign-in.
|
||||
codesign --force --deep --sign - "$bundle"
|
||||
# Developer ID with the hardened runtime and a secure timestamp, as notarization requires.
|
||||
# The identity stays the same across builds, so keychain access to the saved sign-in is
|
||||
# granted once. An ad-hoc signature is a new identity on every build.
|
||||
if [[ "$identity" == "-" ]]; then
|
||||
codesign --force --sign - "$bundle"
|
||||
else
|
||||
codesign --force --options runtime --timestamp --sign "$identity" "$bundle"
|
||||
fi
|
||||
codesign --verify --strict --verbose=2 "$bundle"
|
||||
|
||||
echo "Built $bundle ($version)"
|
||||
if [[ "${1:-}" == "--install" ]]; then
|
||||
|
||||
Reference in new issue
Block a user