pgadmin4/pkg/mac/codesign-bundle.sh
Paresh More 520b03cb0a Fixed notarization issue on Catalina for pgAdmin4 binaries
- Revert back binary name pgAdmin 4 to pgAdmin.
 - Added timestamp, force and developer bundle_id option for codesign binaries, app, and dmg file.
2020-02-05 14:00:18 +05:30

27 lines
579 B
Bash
Executable File

#!/bin/sh
BUNDLE="$1"
if ! test -d "${BUNDLE}" ; then
echo "${BUNDLE} is no bundle!" >&2
exit 1
fi
# Get the config
source codesign.conf
# Sign the .app
echo Signing ${BUNDLE}
codesign --deep --force --verify --verbose --timestamp --options runtime -i "${DEVELOPER_BUNDLE_ID}" --sign "${DEVELOPER_ID}" "${BUNDLE}"
# Verify it worked
echo Verifying the signature
codesign --verify --verbose --deep --force "${BUNDLE}"
RETURN_STATUS=$?
if [ ${RETURN_STATUS} -ne 0 ]; then
echo Code signing did not work, check the log
exit 1
else
echo ${BUNDLE} successfully signed
fi