chore: use unique name for temp macos keychain
This commit is contained in:
parent
780d715dfb
commit
a1af5742e2
|
@ -21,10 +21,16 @@ REL_DIR="${1}"
|
||||||
PKSC12_FILE="$HOME/developer-id-application.p12"
|
PKSC12_FILE="$HOME/developer-id-application.p12"
|
||||||
base64 --decode > "${PKSC12_FILE}" <<<"${APPLE_DEVELOPER_ID_BUNDLE}"
|
base64 --decode > "${PKSC12_FILE}" <<<"${APPLE_DEVELOPER_ID_BUNDLE}"
|
||||||
|
|
||||||
KEYCHAIN='emqx.keychain-db'
|
KEYCHAIN="emqx-$(date +%s).keychain-db"
|
||||||
KEYCHAIN_PASSWORD="$(openssl rand -base64 32)"
|
KEYCHAIN_PASSWORD="$(openssl rand -base64 32)"
|
||||||
|
|
||||||
security delete-keychain "${KEYCHAIN}" 2>/dev/null || true
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
function cleanup {
|
||||||
|
set +e
|
||||||
|
security delete-keychain "${KEYCHAIN}" 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}"
|
security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}"
|
||||||
security set-keychain-settings -lut 21600 "${KEYCHAIN}"
|
security set-keychain-settings -lut 21600 "${KEYCHAIN}"
|
||||||
security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}"
|
security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}"
|
||||||
|
@ -69,3 +75,5 @@ for f in \
|
||||||
; do
|
; do
|
||||||
find "${REL_DIR}"/lib/ -name "$f" -exec codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime {} \;
|
find "${REL_DIR}"/lib/ -name "$f" -exec codesign -s "${APPLE_DEVELOPER_IDENTITY}" -f --verbose=4 --timestamp --options=runtime {} \;
|
||||||
done
|
done
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
Loading…
Reference in New Issue