cli-tools icon indicating copy to clipboard operation
cli-tools copied to clipboard

Getting the latest build number across ALL versions

Open orenagiv opened this issue 2 years ago • 4 comments

Hey,

Currently it seems this tool fetches the latest build number of the highest version number. However, when dealing with hot fixes - we sometimes need to create a build in a lower version than the newest one.

Is there a way to instruct the tool to fetch the latest build number across all versions? (and not only from the highest one?)

orenagiv avatar Jun 13 '23 09:06 orenagiv

Hi @orenagiv ,

Thank you for reporting this issue. Can you tell us from what service you were trying to get the latest build number? Please provide the exact commands you were using as well as a description of actual vs expected behavior.

helinanever avatar Jun 20 '23 09:06 helinanever

I am probably facing the same issue as orenagiv. This is Apple specific as for Android the build versions are globally unique, while for Apple distributions every version can have their own build numbers.

Simple case: For the App we already build Version 2.0.0 with e.g. build number 5 but did not publish it yet, as the app is not final.

We had released 1.9.0 but now need to develop a quick fix 1.9.1 for some security issue.

When using appstoreconnect, we always going to receive 5 for the latest build number, as 2.0.0 > 1.9.1. Then the simple build number + 1 logic, is always going to return 6, which is not the version we want. As soon as we need two build numbers for our 1.9.1 release, they are going to both have the version 6 and fail to upload.

Possible fix: Allow the user to specify the version which should be checked for the latest build number. Here, we could hand the public version (1.9.1 | 2.0.0) and receive the correct build number and increment it.

The exact command I am currently using $(app-store-connect get-latest-build-number "$APP_ID")

sebimarkgraf avatar Jun 22 '23 13:06 sebimarkgraf

Update mainly for @orenagiv : A possible supported way for the scenario seems to be get-latest-testflight-build-number which supports --pre-release-version to query a specific version.

sebimarkgraf avatar Jun 22 '23 14:06 sebimarkgraf