Merge pull request #314 from jagerman/v172

macos auto-signing attempts
This commit is contained in:
Sean 2022-06-26 07:21:39 +10:00 committed by GitHub
commit 28c4c3a1d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 1 deletions

View File

@ -80,11 +80,16 @@ local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q';
name: 'build',
environment: {
SSH_KEY: { from_secret: 'SSH_KEY' },
CSC_IDENTITY_AUTO_DISCOVERY: 'false',
CSC_LINK: 'tools/macos-codesign-cert.p12',
CSC_KEY_PASSWORD: { from_secret: 'CSC_KEY_PASSWORD' },
SIGNING_APPLE_ID: { from_secret: 'SIGNING_APPLE_ID' },
SIGNING_APP_PASSWORD: { from_secret: 'SIGNING_APP_PASSWORD' },
SIGNING_TEAM_ID: 'SUQ8J2PCT7',
},
commands: [
'echo "Building on ${DRONE_STAGE_MACHINE}"',
'./tools/download-oxen-files.sh https://oxen.rocks/oxen-io/oxen-core/oxen-stable-macos-LATEST.tar.xz',
'if [ -z "$${SIGNING_APPLE_ID}" ]; then export CSC_IDENTITY_AUTO_DISCOVERY=false; fi',
'npm --version',
'node --version',
'mkdir -p $CCACHE_DIR/electron-builder',

View File

@ -23,6 +23,27 @@ branch_or_tag=${DRONE_BRANCH:-${DRONE_TAG:-unknown}}
upload_to="oxen.rocks/${DRONE_REPO// /_}/${branch_or_tag// /_}"
MACOS_APP=${MACOS_APP:-"dist/electron/Packaged/mac/Oxen Electron Wallet.app"}
if [ "$(uname -s)" == "Darwin" ]; then
if codesign -v "$MACOS_APP"; then
echo -e "\e[32;1mApp is codesigned!"
else
echo -e "\e[33;1mApp is not codesigned; renaming to -unsigned"
if [ -z "$MAC_BUILD_IS_CODESIGNED" ]; then
for f in dist/electron/Packaged/{oxen-electron-wallet,latest}*-mac*; do
if [[ $f = *\** ]]; then # Unexpanded glob means it didn't match anything
echo "Did not find any files matching $f"
fi
newname="${f/mac/mac-unsigned}"
mv "$f" "$newname"
if [[ "$f" = *.yml ]]; then
sed -ie 's/-mac/-mac-unsigned/' "$newname"
fi
done
fi
fi
fi
puts=
for f in dist/electron/Packaged/{oxen-electron-wallet-*,latest*.yml}; do
if [[ $f = *\** ]]; then # Unexpanded glob means it didn't match anything

Binary file not shown.