Files
ICCery-CPU/Scripts/lib.sh
T
Local Admin 43bff18101
Build macOS Packages / Build macOS (Intel) (push) Failing after 10s
Build macOS Packages / Build macOS (Apple Silicon) (push) Failing after 10s
Build macOS Packages / Build macOS (Universal) (push) Skipped
removed cruft and restructured.
2026-09-07 05:21:44 -07:00

40 lines
984 B
Bash

#!/bin/bash
# Shared helpers for TargetPrint release scripts.
macos_root() {
# Works when this tree is the Gitea repo root *or* lives under macos/.
local here
here="$(cd "$(dirname "${BASH_SOURCE[1]}")/.." && pwd)"
if [[ -d "$here/TargetPrint.xcodeproj" ]]; then
echo "$here"
return
fi
if [[ -d "$here/macos/TargetPrint.xcodeproj" ]]; then
echo "$here/macos"
return
fi
echo "$here"
}
sign_app() {
local app="$1"
local entitlements="$2"
local identity="${MACOS_CODESIGN_IDENTITY:--}"
if ! command -v codesign >/dev/null 2>&1; then
echo "codesign not available; skipping"
return 0
fi
codesign --force --deep --options runtime \
--sign "$identity" \
--entitlements "$entitlements" \
"$app"
codesign --verify --verbose=2 "$app" || true
}
zip_app() {
local app="$1"
local dest="$2"
rm -f "$dest"
ditto -c -k --keepParent "$app" "$dest"
}