Skip to content

chore: read ASC key and issuer IDs from the environment in upload-testflight.sh - #840

Merged
Pivii merged 1 commit into
developfrom
chore/upload-script-asc-env-ids
Oct 27, 2026
Merged

Pivii merged 1 commit into
developfrom
chore/upload-script-asc-env-ids

Conversation

@Pivii

@Pivii Pivii commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

What

scripts/upload-testflight.sh no longer hardcodes the App Store Connect API Key ID and Issuer ID. It reads them from the environment:

Variable Meaning
ASC_KEY_ID The API key's Key ID
ASC_ISSUER_ID The team's Issuer ID

These are the names asc itself reads (checked against asc 4.2.0), so the same exports also serve as its fallback credentials.

Why

Account identifiers belong in the operator's environment, not in a tracked script.

How

  • A require_env guard runs right after cd to the repo root, before reading any plist, resolving packages or archiving. A missing or empty variable exits 1 with the variable's name, where to find it, and a placeholder export.
  • The .p8 path stays derived from the Key ID: ~/.asc/keys/AuthKey_<ASC_KEY_ID>.p8.
  • The script header, docs/VERSIONING.md (upload runbook) and .claude/skills/testflight-build/SKILL.md (step 2) list the exports, placeholders only.

Setting the variables

App Store Connect > Users and Access > Integrations > App Store Connect API (Team Keys):

export ASC_KEY_ID=<your-key-id>
export ASC_ISSUER_ID=<your-issuer-id>

Put them in ~/.zshrc (or equivalent) before the next upload, or the script stops at the guard.

Validation

  • bash -n, sh -n, shellcheck: clean.
  • Ran the script with both unset, with only ASC_ISSUER_ID unset, and with ASC_KEY_ID empty: each exits 1 at the guard, naming the right variable. No archive, export or upload ran, and the tree stayed clean.
  • git grep: the previous literal values no longer appear in the tree. They remain in git history.
  • Not run: an actual upload. The first real cut after merge is the end-to-end test.

🤖 Generated with Claude Code

…tflight.sh

The App Store Connect API Key ID and Issuer ID were hardcoded in the
upload script. They now come from ASC_KEY_ID and ASC_ISSUER_ID, the
names asc itself reads, and the script exits before any archive work
when either is missing. The .p8 path stays derived from the Key ID.

VERSIONING.md and the testflight-build skill list the required exports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 9e2b203 and bc4cad5.

Files selected for processing: 3
  • .claude/skills/testflight-build/SKILL.md
  • docs/VERSIONING.md
  • scripts/upload-testflight.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Pivii
Pivii merged commit 19af3be into develop Oct 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant