forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[contrib/mac/app]: Add renotarization script for easier notarization …
…of built DMGs
- Loading branch information
1 parent
6aa0d92
commit 8667f52
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
# We need a URL | ||
if [[ -z "$1" ]]; then | ||
echo "Usage: $0 <julia DMG url>" >&2 | ||
exit 1 | ||
fi | ||
|
||
# You need to define these in your environment | ||
if [[ -z "${APPLEID}" ]] || [[ -z "${APPLEID_PASSWORD}" ]]; then | ||
echo "You must define APPLEID and APPLEID_PASSWORD in your environment!" >&2 | ||
exit 1 | ||
fi | ||
|
||
# Download .dmg | ||
curl -L "$1" -O | ||
|
||
# Unpack dmg into our `dmg` folder | ||
rm -rf dmg | ||
|
||
# Copy app over to our `dmg` folder | ||
for j in /Volumes/Julia-*; do hdiutil detach "${j}"; done | ||
hdiutil mount "$(basename "$1")" | ||
cp -Ra /Volumes/Julia-* dmg | ||
|
||
# Override some important Makefile variables | ||
DMG_NAME=$(basename "$1") | ||
APP_NAME=$(basename dmg/*.app) | ||
VOL_NAME=$(basename /Volumes/Julia-*) | ||
# Unmount everything again | ||
for j in /Volumes/Julia-*; do hdiutil detach "${j}"; done | ||
|
||
# Run notarization | ||
make notarize "DMG_NAME=${DMG_NAME}" "APP_NAME=${APP_NAME}" "VOL_NAME=${VOL_NAME}" |