mirror of
https://github.com/rudrankriyam/App-Store-Connect-CLI.git
synced 2026-04-25 23:55:51 +03:00
[GH-ISSUE #727] builds latest: add --exclude-expired for deterministic latest/next build numbers #197
Labels
No labels
bug
bug
documentation
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/App-Store-Connect-CLI#197
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cursor[bot] on GitHub (Feb 22, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/727
Summary
Add a new
--exclude-expiredflag toasc builds latestso expired builds are ignored when returning the latest build and when computing--nextbuild numbers.Problem
Teams using Fastlane/TestFlight frequently hit build-number instability when expired builds are included in latest-build queries.
Related upstream pain points:
asc builds latestalready supports deterministic filters (--version,--platform) and--next, but does not currently expose a way to exclude expired builds.Proposal
Add a boolean flag:
--exclude-expired(defaultfalse)Behavior:
--next:expired=falsewhen--exclude-expiredis set.--next:LatestProcessedBuildNumberusing the same expired filter semantics.API support
OpenAPI for
/v1/buildssupportsfilter[expired], so this should be implemented server-side in client query/options plumbing and used bybuilds latestfetches.Scope
internal/asc: add builds query option for expired filter(s)internal/cli/builds/builds_latest.go: thread new flag through all latest build fetch branchesAcceptance criteria
asc builds latest --exclude-expirednever returns an expired latest build when non-expired builds existasc builds latest --next --exclude-expiredcomputes next number from non-expired processed builds + uploadsASC_BYPASS_KEYCHAIN=1Suggested tests
--nexthonors exclude-expiredNotes
This is intentionally a focused, low-risk enhancement that maps directly to recurring ASC/TestFlight workflow pain.
@rudrankriyam commented on GitHub (Feb 22, 2026):
@cursor please implement this
@cursor[bot] commented on GitHub (Feb 22, 2026):
Implemented end-to-end on
cursor/builds-latest-expired-filter-7e49and pushed in 3 commits (8e9d8b9,b2faf5d,e7eb705):--exclude-expiredtoasc builds latestwith help text + example updates (internal/cli/builds/builds_latest.go).--nextprocessed-build calculations honorexpired=falsewhen requested.buildsQuery.expired *boolWithBuildsExpired(bool)GetBuildsnow serializesfilter[expired]and correctly uses/v1/buildswhen this filter is set.--exclude-expiredis not passed.I also added/updated tests for valid and invalid behavior:
internal/asc/client_test.go,internal/asc/client_http_test.go).internal/cli/builds/builds_latest_test.go).--exclude-expired--next --exclude-expiredhonoring processed-build filter semantics(
internal/cli/cmdtest/builds_latest_output_test.go).--exclude-expired=maybe) validated via built-binary subprocess test asserting stderr + exit code2(cmd/exit_codes_test.go).Validation performed:
make formatmake lintASC_BYPASS_KEYCHAIN=1 make testWalkthrough artifacts: