Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
Resolves #18497
The AndroidPublisherV3 API now returns only the latest version of each track instead of multiple versions as before. This created a difficulty when trying to promote older versions, as they were not being returned by the API. See fastlane/fastlane#18497 for more info.
To work around this issue, a solution was implemented to force the submission of the version with
version_code = 1
, requiring the inclusion of the--version_name
parameter and also the--track_promote_force
parameter. This ensures that the older version is submitted correctly, even after the change in the API.Description
In
supply/lib/supply/uploader.rb
, a new condition has been introduced to validate whether the user wants to force the promotion of a track (--track_promote_force). If this option is triggered, the use of the --version_name parameter becomes mandatory. Consequently, the values of name and version_codes are overridden by the information provided through the parameters. This ensures that the older version is correctly sent, even in the face of changes to the API.Testing Steps
To diagnose the issue, simply attempt to promote an older version.
In my case, 870871 is an older version, with newer ones ahead, such as 870872, 870873...
When attempting to promote this version using Fastlane version 2.220.0, I receive the following error:
[!] Track 'internal' doesn't have any releases
After making the changes locally and rerunning the script to promote the version, it worked correctly.
❌ Error Case:
✅ Success Case: