mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-01 21:09:10 -06:00
520b03cb0a
- Revert back binary name pgAdmin 4 to pgAdmin. - Added timestamp, force and developer bundle_id option for codesign binaries, app, and dmg file.
31 lines
758 B
Bash
Executable File
31 lines
758 B
Bash
Executable File
#!/bin/bash
|
|
|
|
DMG_VOLUME_NAME=${APP_NAME}
|
|
DMG_NAME=`echo ${DMG_VOLUME_NAME} | sed 's/ //g' | awk '{print tolower($0)}'`
|
|
DMG_IMAGE=${DISTROOT}/${DMG_NAME}-${APP_LONG_VERSION}.dmg
|
|
|
|
if ! test -f "${DMG_IMAGE}" ; then
|
|
echo "${DMG_IMAGE} is no disk image!" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Get the config
|
|
source codesign.conf
|
|
|
|
SCRIPT_DIR=`pwd`
|
|
|
|
# Sign the .app
|
|
echo Signing ${DMG_IMAGE}
|
|
codesign --deep --force --verify --verbose --timestamp --options runtime -i "${DEVELOPER_BUNDLE_ID}" --sign "${DEVELOPER_ID}" "${DMG_IMAGE}"
|
|
|
|
# Verify it worked
|
|
echo Verifying the signature
|
|
codesign --verify --verbose --force "${DMG_IMAGE}"
|
|
RETURN_STATUS=$?
|
|
if [ ${RETURN_STATUS} -ne 0 ]; then
|
|
echo ERROR: Code signing did not work
|
|
exit 1
|
|
else
|
|
echo ${DMG_IMAGE} successfully signed
|
|
fi
|