Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 12 additions & 27 deletions .circleci/runner/src/scripts/mac/code-sign.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright 2022-2025 Salesforce, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -15,29 +15,14 @@

set -euo pipefail

APP_ZIP_PATTERN="${PROD_NAME}*macOS_64-bit.zip"

cd ${ARTIFACTS_DIR} && APP_ZIP=$(find . -type f -iname "${APP_ZIP_PATTERN}");

echo $APP_ZIP

APP_ZIP_NAME=${APP_ZIP:2}

echo "$APP_ZIP_NAME"

unzip $APP_ZIP_NAME

rm $APP_ZIP_NAME

ls -l ${ARTIFACTS_DIR}

codesign --force --deep --verbose --verify --sign "Developer ID Application: SLACK TECHNOLOGIES L.L.C. (BQR82RBBHL)" --options runtime "${PROD_NAME}"

codesign -vvv --deep --strict "${PROD_NAME}"

zip -r "${APP_ZIP_NAME}" "${PROD_NAME}"

xcrun notarytool submit "${APP_ZIP_NAME}" -p "HERMES_NOTARY"



cd "${ARTIFACTS_DIR}"

for package in "${PROD_NAME}"*macOS_*.zip; do
echo "Signing: ${package}"
unzip "${package}"
codesign --force --deep --verbose --verify --sign "Developer ID Application: SLACK TECHNOLOGIES L.L.C. (BQR82RBBHL)" --options runtime "${PROD_NAME}"
codesign -vvv --deep --strict "${PROD_NAME}"
zip -r "${package}" "${PROD_NAME}"
rm "${PROD_NAME}"
xcrun notarytool submit "${package}" -p "HERMES_NOTARY"
done
Comment on lines +18 to +28
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactor to use the loop 👌🏻 ✨

Originally, I think this code was meant to stay in-sync with the other mac code sign implementation. But, since we need to use a loop we're naturally going to need to refactor it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally, I think this code was meant to stay in-sync with the other mac code sign implementation.

Ooh I might not be familiar with that implementation, but I'd love to know about it for future reference if possible 🤖

I'm hoping that a loop instead of repeated script lines is more ideal with multiple binaries now needing signed as well!

Loading