fix(macos): clean keychain only after dmg [skip ci]

This commit is contained in:
Baptiste Augrain 2024-06-04 11:00:07 +02:00
parent c3064a2cb3
commit b5bbda7208

View file

@ -71,11 +71,6 @@ if [[ "${OS_NAME}" == "osx" ]]; then
xcrun stapler staple ./*.app
# spctl --assess -vv --type install ./*.app
echo "+ clean"
security delete-keychain "${KEYCHAIN}"
# shellcheck disable=SC2086
security list-keychains -s $KEYCHAINS
rm "${ZIP_FILE}"
cd ..
@ -91,8 +86,8 @@ if [[ "${OS_NAME}" == "osx" ]]; then
if [[ "${SHOULD_BUILD_DMG}" != "no" ]]; then
echo "Building and moving DMG"
pushd "VSCode-darwin-${VSCODE_ARCH}"
npx create-dmg ./*.app ..
mv ../*.dmg "../assets/${APP_NAME}.${VSCODE_ARCH}.${RELEASE_VERSION}.dmg"
npx create-dmg ./*.app .
mv ./*.dmg "../assets/${APP_NAME}.${VSCODE_ARCH}.${RELEASE_VERSION}.dmg"
popd
fi
@ -101,6 +96,13 @@ if [[ "${OS_NAME}" == "osx" ]]; then
git archive --format zip --output="./assets/${APP_NAME}-${RELEASE_VERSION}-src.zip" HEAD
fi
if [[ -n "${CERTIFICATE_OSX_P12_DATA}" ]]; then
echo "+ clean"
security delete-keychain "${KEYCHAIN}"
# shellcheck disable=SC2086
security list-keychains -s $KEYCHAINS
fi
VSCODE_PLATFORM="darwin"
elif [[ "${OS_NAME}" == "windows" ]]; then
cd vscode || { echo "'vscode' dir not found"; exit 1; }