[PR #392] [MERGED] Add --pkg flag to builds upload for macOS apps #494

Closed
opened 2026-02-26 22:31:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/392
Author: @rudrankriyam
Created: 2/1/2026
Status: Merged
Merged: 2/1/2026
Merged by: @rudrankriyam

Base: mainHead: feature/macos-pkg-upload


📝 Commits (1)

  • 5b21e7d Add --pkg flag to builds upload for macOS apps

📊 Changes

3 files changed (+91 additions, -25 deletions)

View changed files

📝 internal/asc/client_types.go (+1 -0)
📝 internal/cli/builds/builds_commands.go (+83 -23)
📝 internal/cli/cmdtest/commands_test.go (+7 -2)

📄 Description

Summary

  • Add --pkg flag to asc builds upload command for uploading macOS .pkg installer files
  • When using --pkg, the platform is automatically set to MAC_OS
  • Validate that --ipa and --pkg flags are mutually exclusive
  • Require explicit --version and --build-number flags for PKG uploads (IPA files can auto-extract these from Info.plist)

Changes

  • internal/asc/client_types.go: Add UTIPKG constant for macOS installer package UTI (com.apple.installer-package-archive)
  • internal/cli/builds/builds_commands.go: Add --pkg flag with validation logic and platform auto-detection
  • internal/cli/cmdtest/commands_test.go: Add test cases for new validation behavior

Usage Examples

# Upload a macOS .pkg file
asc builds upload --app "123456789" --pkg "app.pkg" --version "1.0.0" --build-number "1"

# Upload an iOS .ipa file (unchanged)
asc builds upload --app "123456789" --ipa "app.ipa"

Test plan

  • go build . compiles successfully
  • go test ./... passes all tests
  • New validation error messages work correctly:
    • --ipa or --pkg is required when neither is provided
    • --ipa and --pkg are mutually exclusive when both are provided
    • --pkg requires --platform MAC_OS when conflicting platform is specified
    • --version and --build-number required for PKG uploads when missing

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/392 **Author:** [@rudrankriyam](https://github.com/rudrankriyam) **Created:** 2/1/2026 **Status:** ✅ Merged **Merged:** 2/1/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `feature/macos-pkg-upload` --- ### 📝 Commits (1) - [`5b21e7d`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/5b21e7d1294d2f4640663a85519d9aa23ed42553) Add --pkg flag to builds upload for macOS apps ### 📊 Changes **3 files changed** (+91 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `internal/asc/client_types.go` (+1 -0) 📝 `internal/cli/builds/builds_commands.go` (+83 -23) 📝 `internal/cli/cmdtest/commands_test.go` (+7 -2) </details> ### 📄 Description ## Summary - Add `--pkg` flag to `asc builds upload` command for uploading macOS .pkg installer files - When using `--pkg`, the platform is automatically set to `MAC_OS` - Validate that `--ipa` and `--pkg` flags are mutually exclusive - Require explicit `--version` and `--build-number` flags for PKG uploads (IPA files can auto-extract these from Info.plist) ## Changes - `internal/asc/client_types.go`: Add `UTIPKG` constant for macOS installer package UTI (`com.apple.installer-package-archive`) - `internal/cli/builds/builds_commands.go`: Add `--pkg` flag with validation logic and platform auto-detection - `internal/cli/cmdtest/commands_test.go`: Add test cases for new validation behavior ## Usage Examples ```bash # Upload a macOS .pkg file asc builds upload --app "123456789" --pkg "app.pkg" --version "1.0.0" --build-number "1" # Upload an iOS .ipa file (unchanged) asc builds upload --app "123456789" --ipa "app.ipa" ``` ## Test plan - [x] `go build .` compiles successfully - [x] `go test ./...` passes all tests - [x] New validation error messages work correctly: - `--ipa or --pkg is required` when neither is provided - `--ipa and --pkg are mutually exclusive` when both are provided - `--pkg requires --platform MAC_OS` when conflicting platform is specified - `--version and --build-number required for PKG uploads` when missing --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:31:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#494
No description provided.