mirror of
https://github.com/burakgon/OpenScreens.git
synced 2026-12-01 23:50:33 +08:00
The release scripts signed and uploaded through the Apple ID that Xcode is signed in with, and Xcode had forgotten its account in the middle of a release: the archive was made and could not be sent. Named in the environment, an API key and its issuer are now handed to xcodebuild in the Apple ID's place. Version 1.1.1 for iPhone and iPad went to TestFlight that way. The Mac's disk image needs a Developer ID certificate, which a key may use only with access to cloud-managed distribution certificates; the script says so where it says how.
20 lines
1.1 KiB
Bash
20 lines
1.1 KiB
Bash
# Sourced by the release scripts. Leaves in "$@" the xcodebuild arguments
|
|
# that sign in with an App Store Connect API key, or nothing when no key was
|
|
# named and the Apple ID that Xcode is signed in with is to be used.
|
|
#
|
|
# APP_STORE_CONNECT_KEY the key file, AuthKey_<key id>.p8
|
|
# APP_STORE_CONNECT_ISSUER the issuer ID shown above the list of keys
|
|
set --
|
|
if [ -n "${APP_STORE_CONNECT_KEY:-}" ]; then
|
|
[ -f "$APP_STORE_CONNECT_KEY" ] || {
|
|
echo "APP_STORE_CONNECT_KEY names no file: $APP_STORE_CONNECT_KEY" >&2; exit 1; }
|
|
[ -n "${APP_STORE_CONNECT_ISSUER:-}" ] || {
|
|
echo "Set APP_STORE_CONNECT_ISSUER to the key's issuer ID as well." >&2; exit 1; }
|
|
# xcodebuild wants the whole path, and the key's ID is in its file name.
|
|
key_path="$(cd "$(dirname "$APP_STORE_CONNECT_KEY")" && pwd)/$(basename "$APP_STORE_CONNECT_KEY")"
|
|
key_id="$(basename "$APP_STORE_CONNECT_KEY" .p8)"
|
|
set -- -authenticationKeyPath "$key_path" \
|
|
-authenticationKeyID "${key_id#AuthKey_}" \
|
|
-authenticationKeyIssuerID "$APP_STORE_CONNECT_ISSUER"
|
|
fi
|