Skip to content

Commit e36fe95

Browse files
authored
Merge pull request #34794 from JuliaLang/sf/renotarize_script
[contrib/mac/app]: Add renotarization script
2 parents 6aa0d92 + 8667f52 commit e36fe95

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

contrib/mac/app/renotarize_dmg.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
# We need a URL
4+
if [[ -z "$1" ]]; then
5+
echo "Usage: $0 <julia DMG url>" >&2
6+
exit 1
7+
fi
8+
9+
# You need to define these in your environment
10+
if [[ -z "${APPLEID}" ]] || [[ -z "${APPLEID_PASSWORD}" ]]; then
11+
echo "You must define APPLEID and APPLEID_PASSWORD in your environment!" >&2
12+
exit 1
13+
fi
14+
15+
# Download .dmg
16+
curl -L "$1" -O
17+
18+
# Unpack dmg into our `dmg` folder
19+
rm -rf dmg
20+
21+
# Copy app over to our `dmg` folder
22+
for j in /Volumes/Julia-*; do hdiutil detach "${j}"; done
23+
hdiutil mount "$(basename "$1")"
24+
cp -Ra /Volumes/Julia-* dmg
25+
26+
# Override some important Makefile variables
27+
DMG_NAME=$(basename "$1")
28+
APP_NAME=$(basename dmg/*.app)
29+
VOL_NAME=$(basename /Volumes/Julia-*)
30+
# Unmount everything again
31+
for j in /Volumes/Julia-*; do hdiutil detach "${j}"; done
32+
33+
# Run notarization
34+
make notarize "DMG_NAME=${DMG_NAME}" "APP_NAME=${APP_NAME}" "VOL_NAME=${VOL_NAME}"

0 commit comments

Comments
 (0)