[PR #139] [MERGED] Add versions create, update, and delete commands #319

Closed
opened 2026-02-26 21:34:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

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

Base: mainHead: feature/versions-crud


📝 Commits (1)

  • 70947b8 Add versions create, update, and delete commands

📊 Changes

4 files changed (+277 additions, -8 deletions)

View changed files

📝 cmd/versions.go (+207 -0)
📝 internal/asc/client_http_test.go (+4 -1)
📝 internal/asc/client_publish.go (+4 -1)
📝 internal/asc/client_versions.go (+62 -6)

📄 Description

Summary

Adds full CRUD operations for App Store versions, enabling programmatic version management:

  • asc versions create: Create new versions with optional copyright and release type
  • asc versions update: Update copyright, release type, scheduled release date, or version string
  • asc versions delete: Safely delete versions in PREPARE_FOR_SUBMISSION state

New Commands

Create Version

# Basic creation
asc versions create --app "123456789" --version "2.0.0"

# With all options
asc versions create --app "123456789" --version "2.0.0" \
  --platform IOS \
  --copyright "2026 My Company" \
  --release-type MANUAL

Update Version

# Update copyright
asc versions update --version-id "VERSION_ID" --copyright "2026 My Company"

# Schedule a release
asc versions update --version-id "VERSION_ID" \
  --release-type SCHEDULED \
  --earliest-release-date "2026-02-01T08:00:00+00:00"

Delete Version

# Requires --confirm for safety
asc versions delete --version-id "VERSION_ID" --confirm

API Changes

  • Extended AppStoreVersionCreateAttributes to support optional copyright and releaseType fields
  • Added AppStoreVersionUpdateAttributes type for PATCH operations
  • Added UpdateAppStoreVersion() and DeleteAppStoreVersion() client methods
  • Updated CreateAppStoreVersion() signature to accept full attributes struct

Testing

  • Builds successfully: go build ./...
  • All tests pass: go test ./internal/asc/...
  • Tested with real App Store Connect API

Checklist

  • Code follows project patterns (explicit flags, JSON-first output)
  • --confirm required for destructive delete operation
  • Help text includes examples
  • All output formats supported (json, table, markdown)
  • Tests updated for new API signature

🤖 Generated with Claude Code


🔄 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/139 **Author:** [@cameronehrlich](https://github.com/cameronehrlich) **Created:** 1/25/2026 **Status:** ✅ Merged **Merged:** 1/25/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `feature/versions-crud` --- ### 📝 Commits (1) - [`70947b8`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/70947b88cc6f38afa03d425838f8dbb1407e1df8) Add versions create, update, and delete commands ### 📊 Changes **4 files changed** (+277 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `cmd/versions.go` (+207 -0) 📝 `internal/asc/client_http_test.go` (+4 -1) 📝 `internal/asc/client_publish.go` (+4 -1) 📝 `internal/asc/client_versions.go` (+62 -6) </details> ### 📄 Description ## Summary Adds full CRUD operations for App Store versions, enabling programmatic version management: - **`asc versions create`**: Create new versions with optional copyright and release type - **`asc versions update`**: Update copyright, release type, scheduled release date, or version string - **`asc versions delete`**: Safely delete versions in PREPARE_FOR_SUBMISSION state ## New Commands ### Create Version ```bash # Basic creation asc versions create --app "123456789" --version "2.0.0" # With all options asc versions create --app "123456789" --version "2.0.0" \ --platform IOS \ --copyright "2026 My Company" \ --release-type MANUAL ``` ### Update Version ```bash # Update copyright asc versions update --version-id "VERSION_ID" --copyright "2026 My Company" # Schedule a release asc versions update --version-id "VERSION_ID" \ --release-type SCHEDULED \ --earliest-release-date "2026-02-01T08:00:00+00:00" ``` ### Delete Version ```bash # Requires --confirm for safety asc versions delete --version-id "VERSION_ID" --confirm ``` ## API Changes - Extended `AppStoreVersionCreateAttributes` to support optional `copyright` and `releaseType` fields - Added `AppStoreVersionUpdateAttributes` type for PATCH operations - Added `UpdateAppStoreVersion()` and `DeleteAppStoreVersion()` client methods - Updated `CreateAppStoreVersion()` signature to accept full attributes struct ## Testing - Builds successfully: `go build ./...` - All tests pass: `go test ./internal/asc/...` - Tested with real App Store Connect API ## Checklist - [x] Code follows project patterns (explicit flags, JSON-first output) - [x] `--confirm` required for destructive delete operation - [x] Help text includes examples - [x] All output formats supported (json, table, markdown) - [x] Tests updated for new API signature --- 🤖 Generated with [Claude Code](https://claude.ai/code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 21:34:34 +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#319
No description provided.