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

Promoting non-latest alpha track version to production fails on Google Play Store #18497

Closed
4 tasks done
gary-cohen opened this issue Apr 1, 2021 · 10 comments · May be fixed by #22025
Closed
4 tasks done

Promoting non-latest alpha track version to production fails on Google Play Store #18497

gary-cohen opened this issue Apr 1, 2021 · 10 comments · May be fixed by #22025

Comments

@gary-cohen
Copy link

gary-cohen commented Apr 1, 2021

New Issue Checklist

Issue Description

We have multiple builds in our Google Play Alpha track, and quite often we want to promote an earlier version in that track to production. When we specify the specific version to promote, and it's not the current one, we get this error:

[!] Track 'alpha' doesn't have any releases

Yet, when we run google_play_track_version_codes on the alpha track it returns the version code we specified.

An example of our issue:

  1. Push version 1 to alpha track
  2. Push version 2 to alpha track
  3. Push version 3 to alpha track
  4. Promote version 1 to production track via Fastlane
  5. Track 'alpha' doesn't have any releases
  6. Manually promote version 1 to production track via Google Play console
  7. Success
Command executed
supply(
  package_name: "xxx.xxxxxxxxxx",
  track: "alpha",
  track_promote_to: "production",
  validate_only: false,
  skip_upload_apk: true,
  skip_upload_aab: true,
  skip_upload_images: true,
  skip_upload_screenshots: true,
  version_code:version_code,
)
Complete output when running fastlane, including the stack trace and command used
 
[✔] 🚀 
[19:26:24]: fastlane detected a Gemfile in the current directory
[19:26:24]: However, it seems like you didn't use `bundle exec`
[19:26:24]: To launch fastlane faster, please use
[19:26:24]: 
[19:26:24]: $ bundle exec fastlane android release build_number:3595
[19:26:24]: 
[19:26:24]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
+-------------------------------------------+---------+--------------------------------------------------------------------+
|                                                       Used plugins                                                       |
+-------------------------------------------+---------+--------------------------------------------------------------------+
| Plugin                                    | Version | Action                                                             |
+-------------------------------------------+---------+--------------------------------------------------------------------+
| fastlane-plugin-sentry                    | 1.8.1   | sentry_upload_dsym sentry_set_commits sentry_upload_sourcemap      |
|                                           |         | sentry_finalize_release sentry_upload_file sentry_upload_proguard  |
|                                           |         | sentry_create_release                                              |
| fastlane-plugin-firebase_app_distribution | 0.2.4   | firebase_app_distribution_login firebase_app_distribution          |
| fastlane-plugin-rollbar                   | 0.1.10  | rollbar_proguard_upload rollbar_dsym_upload rollbar_report_deploy  |
|                                           |         | rollbar_sourcemaps_upload                                          |
+-------------------------------------------+---------+--------------------------------------------------------------------+

19:26:25: --- Step: Verifying fastlane version ---
19:26:25: ----------------------------------------
19:26:25: Your fastlane version 2.179.0 matches the minimum requirement of 2.158.0 ✅
19:26:25: ------------------------------
19:26:25: --- Step: default_platform ---
19:26:25: ------------------------------
19:26:25: Driving the lane 'android release' 🚀
19:26:25: ---------------------------------------------
19:26:25: --- Step: google_play_track_version_codes ---
19:26:25: ---------------------------------------------
[19:26:26]: Found '1052175, 2100751, 3149327, 4197903' version codes in track 'alpha'
[19:26:26]: ---------------------------------------------------------------------------------------------------
[19:26:26]: --- Step: cp ./metadata/fr-FR/release_notes.txt ./metadata/android/fr-FR/changelogs/1052171.txt ---
[19:26:26]: ---------------------------------------------------------------------------------------------------
[19:26:26]: $ cp ./metadata/fr-FR/release_notes.txt ./metadata/android/fr-FR/changelogs/1052171.txt
[19:26:26]: --------------------
[19:26:26]: --- Step: supply ---
[19:26:26]: --------------------

+---------------------------------+-------------------------------+
| Summary for supply 2.179.0 |
+---------------------------------+-------------------------------+
| package_name | xxx.xxxxxxxxxx |
| track | alpha |
| track_promote_to | production |
| validate_only | false |
| skip_upload_apk | true |
| skip_upload_aab | true |
| skip_upload_images | true |
| skip_upload_screenshots | true |
| version_code | 1052171 |
| release_status | completed |
| metadata_path | ./fastlane/metadata/android |
| json_key | ./android/google_play_pk.json |
| skip_upload_metadata | false |
| skip_upload_changelogs | false |
| check_superseded_tracks | false |
| timeout | 300 |
| deactivate_on_promote | true |
| ack_bundle_installation_warning | false |
+---------------------------------+-------------------------------+

+------------------+-----------------+
| Lane Context |
+------------------+-----------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | android |
| LANE_NAME | android release |
+------------------+-----------------+
[19:26:27]: Track 'alpha' doesn't have any releases

+------+---------------------------------------------------------------+-------------+
| fastlane summary |
+------+---------------------------------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------------------------------------------------+-------------+
| 1 | Verifying fastlane version | 0 |
| 2 | default_platform | 0 |
| 3 | google_play_track_version_codes | 1 |
| 4 | cp ./metadata/fr-FR/release_notes.txt ./metadata/android/fr-F | 0 |
| 💥 | supply | 1 |
+------+---------------------------------------------------------------+-------------+

+---------------------------+--------------+----------------+
| Plugin updates available |
+---------------------------+--------------+----------------+
| Plugin | Your Version | Latest Version |
+---------------------------+--------------+----------------+
| firebase_app_distribution | 0.2.4 | 0.2.5 |
+---------------------------+--------------+----------------+
[19:26:27]: To update all plugins, just run
[19:26:27]: $ bundle exec fastlane update_plugins

[19:26:27]: fastlane finished with errors

[!] Track 'alpha' doesn't have any releases

Environment

 
🚫 fastlane environment 🚫

Stack

Key Value
OS 10.16
Ruby 2.6.5
Bundler? false
Git git version 2.24.1
Installation Source ~/.rbenv/versions/2.6.5/bin/fastlane
Host Mac OS X 10.16 (20D91)
Ruby Lib Dir ~/.rbenv/versions/2.6.5/lib
OpenSSL Version OpenSSL 1.1.1d 10 Sep 2019
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 12.4

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE

fastlane files:

`./Fastfile`
require 'net/http'
require 'uri'
require 'json'
require 'spaceship'
require 'yaml'
require_relative "../../../fastlane/version_utils.android"

fastlane_version "2.158.0"
default_platform :ios
before_all do
     skip_docs
end

lane :validate_matching_versions do

  ios_build = latest_testflight_build_number(
    app_identifier: "xxxxxxxx",
  )
  google_versions = google_play_track_version_codes(
    package_name: "xxx.xxxxxxxxxx",
    track: "alpha"
  )

  raise "The latest versions of iOS (#{ios_build}) and Android (#{google_versions[0].to_i - 1048576}) do not match" unless ios_build == (google_versions[0].to_i - 1048576)
  puts "Releasing build #{ios_build}, and corresponding android APKs #{google_versions}"

  # We use the iOS build to get the commit because the google version is not checked into the code, it is calculated based on the same number as the iOS build
  ios_build
end

def get_current_commit_hash_and_message
  sh "git show -s --format='%h %s'"
end

def get_commit_hash_and_version_from_build_number build_number
  # returns the commit hash where we bumped the build number.  Since we commit this change at the same time we release beta builds to testflight / google
  # we can be certain that this commit represents the actual state of the released build.
  # Get all commits that contain a change to the version matching the build number,
  # we take the first one that occurs (there is always a second where this line is modified with the next build number)
  result = sh %Q{git -c diff.renameLimit=99999 log -G"CURRENT_PROJECT_VERSION = #{build_number}" --pretty=format:"%H %s" --text --reverse | head -n 1}
  result.match(/^(\w+).*\s([\d\.]+)$/).captures
end

def get_github_auth_token
  check_gh_is_installed = sh(
    "gh",
    log: false,
    error_callback: ->(result) { raise "You need to install the github CLI: `brew install github/gh/gh` and to run a first command (e.g. `gh issue list`) to authenticate." }
  )

  gh_hosts_file_pathname = "#{ENV['HOME']}/.config/gh/hosts.yml"
  gh_hosts_file_exists = File.exist?(gh_hosts_file_pathname)

  if !gh_hosts_file_exists
    raise "You need to run a first command (e.g. `gh issue list`) to authenticate.
      If it's still doesn't work, check gh version is >= 0.10.0, you can upgrade with brew upgrade gh
      If you had already a previous gh configuration file, you need to update it to the new version then run a first command: `rm ~/.config/gh/config.yml && gh issue list`"
  end

  hosts = YAML.load_file(gh_hosts_file_pathname)
  github_auth_token = hosts["github.com"]["oauth_token"]

  if github_auth_token.nil? or github_auth_token == ""
    raise "Your token seems missing from `~/.config/gh/hosts.yml`. Check you have correctly installed the github CLI: `brew install github/gh/gh` and have run a first command (e.g. `gh issue list`) to authenticate."
  end

  github_auth_token
end

def update_and_publish_github_release(github_auth_token, version_tag)
  # get the draft release from GitHub - it may be doable with GitHub CLI in the future, but for now we use the GitHub API
  list_releases_uri = URI.parse("https://api.github.com/repos/xxxxxx/xxxxxxx/releases")
  list_releases_request = Net::HTTP::Get.new(list_releases_uri)
  list_releases_request["Authorization"] = "token #{github_auth_token}"

  req_options = {
    use_ssl: true,
  }

  releases_response = Net::HTTP.start(list_releases_uri.hostname, list_releases_uri.port, req_options) do |http|
    http.request(list_releases_request)
  end

  draft_release = JSON.parse(releases_response.body)[0]
  draft_release_id = draft_release["id"]
  draft_release_body = draft_release["body"]
  mobile_draft_release_index = draft_release_body.index("## Mobile")
  if mobile_draft_release_index.nil?
    mobile_draft_release_body = "## Mobile\nEmpty release\n"
  else
    mobile_draft_release_body = draft_release_body[mobile_draft_release_index..-1]
  end

  # update the draft description and publish the release

  release_uri = URI.parse("https://api.github.com/repos/xxxxxx/xxxxxxx/releases/#{draft_release_id}")
  release_request = Net::HTTP::Patch.new(release_uri)
  release_request["Authorization"] = "token #{github_auth_token}"
  release_request.body = JSON.dump({
    "draft" => false,
    "name" => "#{version_tag}",
    "tag_name" => "#{version_tag}",
    "body" => "#{mobile_draft_release_body}"
  })

  response = Net::HTTP.start(release_uri.hostname, release_uri.port, req_options) do |http|
    http.request(release_request)
  end

  if Integer(response.code) >= 400
    raise "Publishing the release on GitHub failed with HTTP status #{response.code} and body #{response.body}"
  end
end

# Release to app stores
# Example on how to run: fastlane release_ios_and_android build_number:[build number] dry_run:[true|false|default is false]
lane :release_ios_and_android do |options|
  if options[:dry_run]
    UI.important("Running in DRY RUN mode !")
  else
    UI.important("Running in LIVE mode !")
  end

  # Try to get a github oauth token from github CLI config
  github_auth_token = get_github_auth_token()

  desc "Release the latest build of a specified version to production on iOS and android"
  build_number = options[:build_number]
  if build_number.nil?
    build_number = validate_matching_versions
  end

  commit_hash, app_version = get_commit_hash_and_version_from_build_number(build_number)
  options[:app_version] = app_version

  version_tag = "mobile_v#{app_version}"

  if options[:dry_run]
    UI.important("Would push #{version_tag} tag to Github")
  else
    # ignore any errors when pushing a tag to Git (it shouldn't block the release)
    begin
      add_git_tag(
        tag: version_tag,
        commit: commit_hash,
        force: true
      )
      push_git_tags(tag: version_tag)
    rescue => ex
      UI.error(ex)
    end
  end

  Fastlane::LaneManager.cruise_lane("ios", "release", options)
  Fastlane::LaneManager.cruise_lane("android", "release", options)

  if options[:dry_run]
    UI.important("Would update, publish, and bump version on Github")
  else
    update_and_publish_github_release(github_auth_token, version_tag)
    bump_version
  end
end

lane :bump_version do
  desc "Bump minor version number and set patch to 0"

  increment_ios_version_minor("./ios/xxxxxx.xcodeproj")
  increment_android_version_minor("../android/app/build.gradle")
  new_version_name = get_android_version_name("../android/app/build.gradle")

  git_commit(
    path: [
      "./android/app/build.gradle",
      "./ios/xxxxxx/Info.plist",
      "./fastlane/metadata/fr-FR/release_notes.txt",
    ],
    message: "Bumping mobile version to #{new_version_name}"
  )
  push_to_git_remote(
    remote: "origin",
    remote_branch: "xxxxxxxx",
    tags: false # They were already pushed
  )
end

desc "Bump build number"
lane :bump_build_number do
  increment_build_number(
      xcodeproj: "./ios/xxxxxx.xcodeproj",
  )
  increment_version_number(
      xcodeproj: "./ios/xxxxxx.xcodeproj",
      bump_type: "patch",
  )
  build_gradle_file_path = '../android/app/build.gradle'
  increment_android_version_code(build_gradle_file_path)
  increment_android_version_patch(build_gradle_file_path)

  git_commit(
    path: [
      "./android/app/build.gradle",
      "./ios/xxxxxx.xcodeproj/project.pbxproj",
      "./ios/xxxxxx/Info.plist",
    ],
    message: "Forcing a new build of the French mobile app"
  )
  push_to_git_remote(
    remote: "origin",
    remote_branch: "xxxxxxxx",
    tags: false # They were already pushed
  )
end

# iOS
platform :ios do
  before_all do
    setup_circle_ci
  end

  desc "Submit a new Beta Build to Apple TestFlight from CircleCI"
  lane :submit_beta do |options|
    app_store_connect_api_key(
      key_id: ENV["APP_STORE_CONNECT_API_KEY_ID"],
      issuer_id: ENV["APP_STORE_CONNECT_ISSUER_ID"],
      key_content: ENV["APP_STORE_CONNECT_API_KEY"]
    )
    ENV["MOBILE_APP_NAME"] = "xxxxxx"
    xcversion(version: "~> 12.0")
    match(type: "appstore")
    gym(
      clean: true,
      export_method: 'app-store',
      export_options: {
        provisioningProfiles: {
          "xxxxxxxxxx" => "Apple Distribution: xxxxxxx (xxxxxxx)",
        }
      },
      workspace: "ios/xxxxxxxx.xcworkspace/",
      scheme: "xxxxxxxx",
      output_directory: "./build-tools/deploy/data"
    )
    upload_to_testflight(
      skip_waiting_for_build_processing: true,
      demo_account_required: true,
      beta_app_review_info: {
        contact_email: "xxxxxx@xxxxxxx",
        contact_first_name: "xxxxxxx",
        contact_last_name: "xxxxxxx",
        contact_phone: "xxxxxxx",
        demo_account_name: "xxxxxxxxx",
        demo_account_password: "xxxxxxxxx",
        notes: "This account is required to fully test the app."
      }
    )

    SOURCEMAPS_OUTPUT_DIR = "/tmp"
    version_name = get_ios_version_name("./ios/xxxxxx.xcodeproj")
    sh(
       "curl", "https://api.rollbar.com/api/1/sourcemap", "-F", "access_token=#{ENV['ROLLBAR_PUBLISH_ACCESS_TOKEN']}", "-F", "version=#{version_name}", "-F", "minified_url=http://reactnativehost/main.jsbundle", "-F", "source_map=@#{SOURCEMAPS_OUTPUT_DIR}/sourcemap.ios.js"
    )
  end

  desc "Create the release in Sentry and upload the sourcemaps and debug symbols"
  lane :release_sentry do |options|
    # Sentry required env: SENTRY_AUTH_TOKEN (from CircleCI), SENTRY_ORG_SLUG, SENTRY_PROJECT_SLUG
    ENV["SENTRY_ORG_SLUG"] = "xxxxxx"
    ENV["SENTRY_PROJECT_SLUG"] = "xxxxxx"
    release = get_ios_version_name("./ios/xxxxxx.xcodeproj")
    app_identifier = "xxxxxxxx"

    # Get the build number
    build_number = get_build_number(
      xcodeproj: "./ios/xxxxxx.xcodeproj",
    )

    # Create the release and set the commits
    sentry_create_release(
      version: release,
      app_identifier: app_identifier,
      finalize: true,
    )
    sentry_set_commits(
      version: release,
      app_identifier: app_identifier,
      auto: true,
      clear: false,
    )

    # Sends the sourcemaps and debug symbols
    date_today = Time.now.strftime("%F")
    sentry_upload_sourcemap(
      version: release,
      app_identifier: app_identifier,
      dist: build_number,
      url_prefix: "app:///",
      rewrite: true,
      sourcemap: Dir.glob(Dir.home + "/Library/Developer/Xcode/Archives/#{date_today}/*.xcarchive/Products/Applications/xxxxxxx.app/main.jsbundle")[0],
    )
    sentry_upload_sourcemap(
      version: release,
      app_identifier: app_identifier,
      dist: build_number,
      url_prefix: "app:///",
      rewrite: true,
      sourcemap: "/tmp/sourcemap.ios.js",
    )
    sentry_upload_dsym(
      dsym_path: Dir.home + "/project/apps/xxxxxx/build-tools/deploy/data/xxxxxxx.app.dSYM.zip",
    )
  end

  desc "Bump build number"
  lane :bump do
    increment_build_number(
        xcodeproj: "./ios/xxxxxx.xcodeproj",
    )
    increment_version_number(
        xcodeproj: "./ios/xxxxxxx.xcodeproj",
        bump_type: "patch",
    )
  end

  lane :release do |options|
    app_version = options[:app_version]
    if app_version.nil?
      app_version = get_version_number(
        xcodeproj: "./ios/xxxxxxx.xcodeproj",
        target: "xxxxxxxx"
      )
    end

    build_number = options[:build_number]

    if options[:dry_run]
      UI.important("Would release #{app_version} to Apple App Store")
    else
      deliver(
        app_version: app_version,
        build_number: build_number,
        submit_for_review: true,
        app_identifier: "xxxxxxxxxxx",
        automatic_release: true,
        force: true, # Skip HTMl report verification
        skip_screenshots: true,
        skip_binary_upload: true,
        metadata_path: "./fastlane/metadata",
        precheck_include_in_app_purchases: false,
        submission_information: {
          add_id_info_uses_idfa: true,
          add_id_info_serves_ads: false,
          add_id_info_limits_tracking: true,
          add_id_info_tracks_action: true,
          add_id_info_tracks_install: true,
          content_rights_has_rights: true,
          content_rights_contains_third_party_content: true,
          export_compliance_platform: 'ios',
          export_compliance_compliance_required: false,
          export_compliance_encryption_updated: false,
          export_compliance_app_type: nil,
          export_compliance_uses_encryption: false,
          export_compliance_is_exempt: false,
          export_compliance_contains_third_party_cryptography: false,
          export_compliance_contains_proprietary_cryptography: false,
          export_compliance_available_on_french_store: true,
        },
      )
    end
  end
end

# Android
platform :android do
  desc "Deploy a new alpha version to the Google Play Store"
  lane :submit_alpha do |options|
    ENV["MOBILE_APP_NAME"] = "xxxxxx"
    gradle(
      task: "assemble",
      build_type: "Release",
      project_dir: './android',
      flags: "--no-daemon --max-workers=2"
    )
    supply(
      package_name: "xxx.xxxxxxxxxx",
      track: "alpha",
      apk_paths: lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS]
    )
    for path in lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS] do
      beta_group = get_android_beta_group_from_apk_path(path)
      firebase_app_distribution(
          app: "XXXXXXXXX",
          groups: beta_group,
          apk_path: path,
          firebase_cli_path: "../../node_modules/.bin/firebase",
          firebase_cli_token: options[:firebase_token]
      )
    end

    SOURCEMAPS_OUTPUT_DIR = "../android/app/build/generated/sourcemaps/react/release"
    version_name = get_android_version_name("../android/app/build.gradle")
    sh(
       "curl", "https://api.rollbar.com/api/1/sourcemap", "-F", "access_token=#{ENV['ROLLBAR_PUBLISH_ACCESS_TOKEN']}", "-F", "version=#{version_name}", "-F", "minified_url=http://reactnativehost/index.android.bundle", "-F", "source_map=@#{SOURCEMAPS_OUTPUT_DIR}/index.android.bundle.map"
    )
  end

  desc "Create the release in Sentry and upload the sourcemaps and debug symbols"
  lane :release_sentry do |options|
    # Sentry required env: SENTRY_AUTH_TOKEN (from CircleCI), SENTRY_ORG_SLUG, SENTRY_PROJECT_SLUG
    ENV["SENTRY_ORG_SLUG"] = "xxxxxx"
    ENV["SENTRY_PROJECT_SLUG"] = "xxxxxx"
    release = get_android_version_name("../android/app/build.gradle")
    app_identifier = "xxx.xxxxxxxxxx"

    # Get the build number
    build_number = get_build_number(
      xcodeproj: "./ios/XXXXXX.xcodeproj",
    )

    # Create the release and set the commits
    sentry_create_release(
      version: release,
      app_identifier: app_identifier,
      finalize: true
    )
    sentry_set_commits(
      version: release,
      app_identifier: app_identifier,
      auto: true,
      clear: false,
    )

    # Sends the sourcemaps and debug symbols
    sentry_upload_sourcemap(
      version: release,
      app_identifier: app_identifier,
      dist: build_number,
      url_prefix: "app:///",
      rewrite: true,
      sourcemap: "./android/app/build/generated/assets/react/release/index.android.bundle",
    )
    sentry_upload_sourcemap(
      version: release,
      app_identifier: app_identifier,
      dist: build_number,
      url_prefix: "app:///",
      rewrite: true,
      sourcemap: "./android/app/build/generated/sourcemaps/react/release/index.android.bundle.map",
    )
  end

  lane :release do |options|
    version_code = get_android_version_code(options)
    prepare_android_release_notes_for_version(version_code, options[:dry_run])

    if options[:dry_run]
      UI.important("Would release #{version_code} to Google Play Store")
    else
      supply(
        package_name: "xxx.xxxxxxxxxx",
        track: "alpha",
        track_promote_to: "production",
        validate_only: false,
        skip_upload_apk: true,
        skip_upload_aab: true,
        skip_upload_images: true,
        skip_upload_screenshots: true,
        version_code:version_code,
      )

      #  Cleanup tmp file created for android release notes
      android_metadata_filename=get_android_release_notes_filename(version_code)
      sh("rm #{android_metadata_filename}")
    end
  end

  desc "Bump build number and version patch"
  lane :bump do
    build_gradle_file_path = '../android/app/build.gradle'
    increment_android_version_code(build_gradle_file_path)
    increment_android_version_patch(build_gradle_file_path)
  end

end

def get_android_version_code(options)
  play_store_versions = google_play_track_version_codes(
    package_name: "xxx.xxxxxxxxxx",
    track: "alpha"
  )

  version_code = play_store_versions[0]

  if not options[:build_number].nil?
    version_code = options[:build_number].to_i + 1048576
  end

  version_code
end

def prepare_android_release_notes_for_version(version_code, dry_run=false)
    metadata_dir="./metadata/fr-FR"
    android_metadata_filename=get_android_release_notes_filename(version_code)

    if dry_run
      UI.important("Would generate release notes #{android_metadata_filename}")
    else
      sh("cp #{metadata_dir}/release_notes.txt #{android_metadata_filename}")
    end
end

def get_android_release_notes_filename(version)
  "./metadata/android/fr-FR/changelogs/#{version}.txt"
end

def get_android_beta_group_from_apk_path apk_path
  android_beta_group = "android-beta-testers"

  case apk_path
  when /armeabi-v7a-release/
    android_beta_group = "android-beta-testers-armeabi-v7a"
  when /x86_64-release/
    android_beta_group = "android-beta-testers-x86_64"
  when /x86-release/
    android_beta_group = "android-beta-testers-x86"
  when /arm64-v8a-release/
    android_beta_group = "android-beta-testers-arm64-v8a"
  end

  android_beta_group
end

def get_ios_version_name(xcodeproj_file_path)
  return get_version_number(
    xcodeproj: xcodeproj_file_path,
    target: "XXXXXXXXXX"
  )
end

def increment_ios_version_minor(xcodeproj_file_path)
  current_version_name = get_version_number(
    xcodeproj: xcodeproj_file_path,
    target: "XXXXXXXXXX"
  )

  major, minor, patch = current_version_name.split(".")
  new_version = major + "." + (minor.to_i + 1).to_s + ".0"

  increment_version_number(
    xcodeproj: xcodeproj_file_path,
    version_number: new_version,
  )
end
`./Appfile`
itc_team_name "XXXXXXXX"
team_id "XXXXXXXX"
json_key_file "./android/google_play_pk.json"

for_platform "android" do
  for_lane "submit_alpha" do
    package_name "xxx.xxxxxxxxxx"
  end
end

for_platform "ios" do
  for_lane "submit_beta" do
    app_identifier "xxxx.xxxxx.xxx"
  end
end

fastlane gems

Gem Version Update-Status
fastlane 2.179.0 ✅ Up-To-Date

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-sentry 1.8.1 ✅ Up-To-Date
fastlane-plugin-firebase_app_distribution 0.2.4 🚫 Update available
fastlane-plugin-rollbar 0.1.10 ✅ Up-To-Date
Loaded gems
Gem Version
did_you_mean 1.4.0
slack-notifier 2.3.2
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
terminal-table 1.8.0
addressable 2.7.0
multipart-post 2.0.0
word_wrap 1.0.0
artifactory 3.0.15
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
faraday_middleware 1.0.0
gh_inspector 1.1.3
rubyzip 2.3.0
security 0.1.3
uber 0.1.0
declarative-option 0.1.0
representable 3.0.4
retriable 3.1.2
httpclient 2.8.3
google-api-client 0.38.0
nanaimo 0.3.0
colored2 3.1.2
claide 1.0.3
CFPropertyList 3.0.3
atomos 0.1.3
xcodeproj 1.19.0
unicode-display_width 1.7.0
plist 3.6.0
public_suffix 4.0.6
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
babosa 1.0.4
excon 0.79.0
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.3
ruby2_keywords 0.0.4
faraday-net_http 1.0.1
faraday 1.3.0
faraday-cookie_jar 0.0.7
fastimage 2.2.3
json 2.5.1
mini_magick 4.11.0
naturally 2.2.1
xcpretty-travis-formatter 1.0.1
dotenv 2.7.6
bundler 2.1.4
simctl 1.6.8
jwt 2.2.2
declarative 0.0.20
mini_mime 1.0.3
multi_json 1.15.0
signet 0.15.0
os 1.1.1
memoist 0.16.2
googleauth 0.16.0
rake 13.0.3
digest-crc 0.6.3
webrick 1.7.0
rexml 3.2.4
google-apis-core 0.3.0
google-apis-storage_v1 0.3.0
google-apis-iamcredentials_v1 0.2.0
google-cloud-errors 1.1.0
google-cloud-env 1.5.0
google-cloud-core 1.6.0
google-cloud-storage 1.31.0
emoji_regex 3.2.2
aws-eventstream 1.1.1
aws-sigv4 1.2.3
aws-partitions 1.439.0
jmespath 1.4.0
aws-sdk-core 3.113.1
aws-sdk-kms 1.43.0
aws-sdk-s3 1.93.0
forwardable 1.3.1
logger 1.4.2
date 3.0.1
stringio 0.1.3
zlib 1.1.0
openssl 2.2.0
ipaddr 1.2.2
ostruct 0.1.0
strscan 1.0.3
fileutils 1.4.1
io-console 0.5.6
psych 3.2.0
mutex_m 0.1.0
fastlane-plugin-sentry 1.8.1
fastlane-plugin-firebase_app_distribution 0.2.4
fastlane-plugin-rollbar 0.1.10

generated on: 2021-04-01

@gary-cohen gary-cohen changed the title Promoting non-latest alpha track version to production fails Promoting non-latest alpha track version to production fails on Google Play Store Apr 1, 2021
@max-ott max-ott added the tool: supply upload_to_playstore label Apr 7, 2021
@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@gary-cohen
Copy link
Author

I do not see an improvement.

@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@gary-cohen
Copy link
Author

I don't see how it will magically get fixed. But, no, no change. Please someone give this bug some love. 🙏

@MortenGregersen
Copy link
Contributor

This is still a problem

@MortenGregersen
Copy link
Contributor

I see the same when promoting from internal to alpha. Every time I upload a new build to internal, it makes the current as "replaced" in Google Play Console.

@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@fastlane-bot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@MortenGregersen
Copy link
Contributor

I don't know how to elaborate further on this.

@gary-cohen
Copy link
Author

Same here. But having the bot closing the issue when a fix hasn't been made doesn't seem like the right solution. 😞

@fastlane fastlane locked and limited conversation to collaborators Feb 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants