Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Make APPLE_CODESIGN_ID env var optional for CE CI (deskflow#7506)
Browse files Browse the repository at this point in the history
* Remove CI requirement for `APPLE_CODESIGN_ID` for CE CI

* Update ChangeLog
  • Loading branch information
nbolton authored Sep 12, 2024
1 parent 85baccc commit 3bb5ce1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Enhancements:

- #7503 Make package filenames consistent with previous versions
- #7505 Remove static link of libportal from Debian Trixie CI
- #7506 Make `APPLE_CODESIGN_ID` env var optional for CE CI

# 1.16.0

Expand Down
25 changes: 20 additions & 5 deletions scripts/lib/mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import dmgbuild # type: ignore
import os, time, json, shutil
import os, time, json, shutil, sys
import lib.cmd_utils as cmd_utils
import lib.env as env
from lib.certificate import Certificate

cert_p12_env = "APPLE_P12_CERTIFICATE"
notary_user_env = "APPLE_NOTARY_USER"
codesign_env = "APPLE_CODESIGN_ID"
shell_rc = "~/.zshrc"
dist_dir = "dist"
product_name = "Synergy 1"
Expand Down Expand Up @@ -74,20 +75,34 @@ def package(filename_base):
if cert_base64:
install_certificate(cert_base64, cert_password)
else:
print(f"Skipped certificate installation, env var {cert_p12_env} not set")
print(
f"Warning: Skipped certificate installation, env var {cert_p12_env} not set",
file=sys.stderr,
)

build_bundle()
sign_bundle(codesign_id)

if codesign_id:
sign_bundle(codesign_id)
else:
print(
f"Warning: Skipped code signing, env var {codesign_env} not set",
file=sys.stderr,
)

dmg_path = build_dmg(filename_base)

if notary_user:
notarize_package(dmg_path, notary_user, notary_password, notary_team_id)
else:
print(f"Skipped notarization, env var {notary_user_env} not set")
print(
f"Warning: Skipped notarization, env var {notary_user_env} not set",
file=sys.stderr,
)


def package_env_vars():
codesign_id = env.get_env("APPLE_CODESIGN_ID")
codesign_id = env.get_env(codesign_env, required=False)
cert_base64 = env.get_env(cert_p12_env, required=False)
notary_user = env.get_env(notary_user_env, required=False)

Expand Down

0 comments on commit 3bb5ce1

Please sign in to comment.