Skip to content

Commit 857e391

Browse files
committed
jq no longer used by macos package
1 parent 178edba commit 857e391

File tree

1 file changed

+33
-34
lines changed

1 file changed

+33
-34
lines changed

packaging/macos/build-pkg

+33-34
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
version="$1"
33
isRelease="$2"
44
if [ -z "$version" ]; then
5-
echo "Usage: $0 <version> <isRelease>"
6-
exit 1
5+
echo "Usage: $0 <version> <isRelease>"
6+
exit 1
77
fi
88
if [ -z "$isRelease" ]; then
9-
echo "Usage: $0 <version> <isRelease>"
10-
exit 1
9+
echo "Usage: $0 <version> <isRelease>"
10+
exit 1
1111
fi
1212

1313
if [ "$isRelease" == "true" ]; then
14-
if [ -z "$APPLE_NOTARIZE_AUTH_KEY_P8_BASE64" ]; then
15-
echo "Please set APPLE_NOTARIZE_AUTH_KEY_P8_BASE64"
16-
exit 1
17-
fi
18-
if [ -z "$APPLE_NOTARIZE_D" ]; then
19-
echo "Please set APPLE_NOTARIZE_D"
20-
exit 1
21-
fi
22-
if [ -z "$APPLE_NOTARIZE_I" ]; then
23-
echo "Please set APPLE_NOTARIZE_I"
24-
exit 1
25-
fi
14+
if [ -z "$APPLE_NOTARIZE_AUTH_KEY_P8_BASE64" ]; then
15+
echo "Please set APPLE_NOTARIZE_AUTH_KEY_P8_BASE64"
16+
exit 1
17+
fi
18+
if [ -z "$APPLE_NOTARIZE_D" ]; then
19+
echo "Please set APPLE_NOTARIZE_D"
20+
exit 1
21+
fi
22+
if [ -z "$APPLE_NOTARIZE_I" ]; then
23+
echo "Please set APPLE_NOTARIZE_I"
24+
exit 1
25+
fi
2626
fi
2727

2828
build_dir="$(mktemp -d)"
@@ -35,15 +35,14 @@ pkgid="io.nais.device"
3535
pkg_path="./naisdevice.pkg"
3636

3737
# Prepare notarization key
38-
base64 -d > AuthKey.p8 <<< "$APPLE_NOTARIZE_AUTH_KEY_P8_BASE64"
38+
base64 -d >AuthKey.p8 <<<"$APPLE_NOTARIZE_AUTH_KEY_P8_BASE64"
3939

4040
# Build and sign app
4141
mkdir -p "$app_dir/Contents/"{MacOS,Resources}
4242
cp ./bin/macos-client/* "$build_dir/naisdevice.app/Contents/MacOS/"
43-
cp ./packaging/macos/jq-osx-amd64 "$build_dir/naisdevice.app/Contents/MacOS/jq"
4443
cp ./packaging/macos/icons/naisdevice.icns "$build_dir/naisdevice.app/Contents/Resources/"
4544

46-
sed "s/VERSIONSTRING/$version/" ./packaging/macos/Info.plist.tpl > "$build_dir/naisdevice.app/Contents/Info.plist"
45+
sed "s/VERSIONSTRING/$version/" ./packaging/macos/Info.plist.tpl >"$build_dir/naisdevice.app/Contents/Info.plist"
4746

4847
codesign -s "$app_cert" -f -v --timestamp --deep --options runtime "$build_dir/naisdevice.app/Contents/MacOS/"*
4948
codesign -s "$app_cert" -f -v --timestamp --deep --options runtime "$build_dir/naisdevice.app/Contents/Info.plist"
@@ -56,21 +55,21 @@ xattr -rc "$build_dir/pkgroot/$(basename "$app_dir")"
5655

5756
pkgbuild --analyze --root "$build_dir/pkgroot/" "$build_plist"
5857
pkgbuild \
59-
--root "$build_dir/pkgroot/" \
60-
--component-plist "$build_plist" \
61-
--identifier "$pkgid" \
62-
--install-location "/Applications" \
63-
--scripts "$build_dir/scripts" \
64-
--version "$version" \
65-
--sign "$install_cert" \
66-
--ownership recommended \
67-
"$pkg_path"
58+
--root "$build_dir/pkgroot/" \
59+
--component-plist "$build_plist" \
60+
--identifier "$pkgid" \
61+
--install-location "/Applications" \
62+
--scripts "$build_dir/scripts" \
63+
--version "$version" \
64+
--sign "$install_cert" \
65+
--ownership recommended \
66+
"$pkg_path"
6867

6968
if [ "$isRelease" == "true" ]; then
70-
xcrun notarytool submit "$pkg_path" \
71-
-k AuthKey.p8 \
72-
-d "$APPLE_NOTARIZE_D" \
73-
-i "$APPLE_NOTARIZE_I" \
74-
--wait
75-
xcrun stapler staple "$pkg_path"
69+
xcrun notarytool submit "$pkg_path" \
70+
-k AuthKey.p8 \
71+
-d "$APPLE_NOTARIZE_D" \
72+
-i "$APPLE_NOTARIZE_I" \
73+
--wait
74+
xcrun stapler staple "$pkg_path"
7675
fi

0 commit comments

Comments
 (0)