codemagic-ci-cd / cli-tools

Various utilities to managing Android and iOS app builds, code signing, and deployment.
https://codemagic.io/start/
GNU General Public License v3.0
235 stars 39 forks source link

Feature Request: Build number for google play includes unpublished/draft AABs #400

Open cdanek opened 3 months ago

cdanek commented 3 months ago

I have scheduled builds for my app that I occasionally don't publish. These builds have an incremented version number but subsequent builds don't appear to use those version numbers as the max versions (see build 661fef97c0e7002274bcc8d0).

As a workaround, I've set the YAML to increment the max build number by 20, but it would be nice if this script got the "true" maximum version code from all AABs that are in the google play repository, regardless of whether or not they're published or even in a track.

priitlatt commented 3 months ago

@cdanek, thanks for opening the issue. The action google-play get-latest-build-number is designed to obtain latest build numbers only from tracks. Altering its behaviour to work also with builds that do not belong to any tracks would be a significant change, and possibly breaking to many current users.

While it is be possible to paginate over all the uploaded app bundles and apks for given package name, performing such a request is indeterminately expensive since we cannot know up front how many builds there are. Limiting our search space just to tracks gives a very well isolated scope in which the search has to be carried out.

As a workaround to you issue, couldn't you push your releases to some custom track to ensure that their build number can always be discovered?