Changes in this pull request fix the actions that detect the latest build number from App Store Connect for App Store or Pre Release (TestFlight) versions:
app-store-connect get-latest-app-store-build-number and
app-store-connect get-latest-build-number.
In previous versions if --pre-release-version or --app-store-version argument was omitted, then the global latest version for an app was detected only based on build versions, which can lead to wrong results. For example consider the case where we have
TestFlight version 1.0.1 with builds 1, 2,3 and
TestFlight version 1.0.0 with builds 1, 2, ..., 5, 6.
TestFlight version 0.0.1 with builds ..., 5, 999.
In this case the expected latest build is from TestFlight version 1.0.1 with version number 3. But the previous versions pick build with number 999 from TestFlight version 0.0.1 since TestFlight versions were omitted from comparison entirely. Similar issue applies to App Store versions and their build.
Another minor change is that now the detected build number and TestFlight / App Store versions are logged out to STDERR stream. This is useful as the most common use-case for these actions is to capture the current latest build number into a shell variable, which can then be used to set the version of next build.
Example
Old version:
```shell
$ app-store-connect get-latest-build-number 1481211155
2.0.320.508
$ CURRENT_VERSION=$(app-store-connect get-latest-build-number 1481211155)
$ echo $CURRENT_VERSION
2.0.320.508
```
Updated version:
```shell
$ app-store-connect get-latest-build-number 1481211155
Found build number 2.0.320.508 from TestFlight version 2.0.320
2.0.320.508
$ CURRENT_VERSION=$(app-store-connect get-latest-build-number 1481211155)
Found build number 2.0.320.508 from TestFlight version 2.0.320
$ echo $CURRENT_VERSION
2.0.320.508
```
Changes in this pull request fix the actions that detect the latest build number from App Store Connect for App Store or Pre Release (TestFlight) versions:
app-store-connect get-latest-testflight-build-number
,app-store-connect get-latest-app-store-build-number
andapp-store-connect get-latest-build-number
.In previous versions if
--pre-release-version
or--app-store-version
argument was omitted, then the global latest version for an app was detected only based on build versions, which can lead to wrong results. For example consider the case where we have1.0.1
with builds1
,2
,3
and1.0.0
with builds1
,2
, ...,5
,6
.0.0.1
with builds ...,5
,999
.In this case the expected latest build is from TestFlight version
1.0.1
with version number3
. But the previous versions pick build with number999
from TestFlight version0.0.1
since TestFlight versions were omitted from comparison entirely. Similar issue applies to App Store versions and their build.Another minor change is that now the detected build number and TestFlight / App Store versions are logged out to STDERR stream. This is useful as the most common use-case for these actions is to capture the current latest build number into a shell variable, which can then be used to set the version of next build.
Example
Old version: ```shell $ app-store-connect get-latest-build-number 1481211155 2.0.320.508 $ CURRENT_VERSION=$(app-store-connect get-latest-build-number 1481211155) $ echo $CURRENT_VERSION 2.0.320.508 ``` Updated version: ```shell $ app-store-connect get-latest-build-number 1481211155 Found build number 2.0.320.508 from TestFlight version 2.0.320 2.0.320.508 $ CURRENT_VERSION=$(app-store-connect get-latest-build-number 1481211155) Found build number 2.0.320.508 from TestFlight version 2.0.320 $ echo $CURRENT_VERSION 2.0.320.508 ```Updated actions:
app-store-connect get-latest-testflight-build-number
app-store-connect get-latest-app-store-build-number
app-store-connect get-latest-build-number