fix MacOS signing script to restore original keychain list

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-08-10 15:31:54 +02:00 committed by Jakub
parent c53b2cc78a
commit 847ac9bc3c
1 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,7 @@ function clean_up {
echo -e "\n### Locking keychain..." echo -e "\n### Locking keychain..."
security lock-keychain "${MACOS_KEYCHAIN_FILE}" security lock-keychain "${MACOS_KEYCHAIN_FILE}"
echo -e "\n### Restoring default keychain search list..." echo -e "\n### Restoring default keychain search list..."
security list-keychains -s "" security list-keychains -s ${ORIG_KEYCHAIN_LIST}
security list-keychains security list-keychains
exit $STATUS exit $STATUS
@ -50,6 +50,9 @@ if [[ -n "${MACOS_KEYCHAIN_FILE}" ]]; then
echo "Unable to unlock the keychain without MACOS_KEYCHAIN_PASS!" >&2 echo "Unable to unlock the keychain without MACOS_KEYCHAIN_PASS!" >&2
exit 1 exit 1
fi fi
echo -e "\n### Storing original keychain search list..."
ORIG_KEYCHAIN_LIST=$(security list-keychains | grep -v "^/private" | xargs)
# The keychain file needs to be locked afterwards # The keychain file needs to be locked afterwards
trap clean_up EXIT ERR trap clean_up EXIT ERR