Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: App Store and Testflight latest build numbers #300

Merged
merged 6 commits into from
Jan 20, 2023

Conversation

priitlatt
Copy link
Contributor

@priitlatt priitlatt commented Jan 18, 2023

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 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:

$ 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:

$ 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

@priitlatt priitlatt added the bug Something isn't working label Jan 19, 2023
@priitlatt priitlatt marked this pull request as ready for review January 19, 2023 09:52
@priitlatt priitlatt changed the title Bugfix/app store testflight latest build number Bugfix: App Store and Testflight latest build numbers Jan 20, 2023
@priitlatt priitlatt merged commit d8723e3 into master Jan 20, 2023
@priitlatt priitlatt deleted the bugfix/app-store-testflight-latest-build-number branch January 20, 2023 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants