INNER CODE UNIT · Ruby

with_play_edit_retries

wordpress-mobile/WordPress-Android · fastlane/lanes/promote.rb:393

  def with_play_edit_retries(description, attempts: 3, wait: 15)
    tries = 0
    begin
      yield
    rescue FastlaneCore::Interface::FastlaneError => e
      tries += 1
      raise unless e.message.start_with?('Google Api Error') && tries < attempts

      UI.error("#{description} failed (#{e.message}); retrying with a fresh edit (#{tries}/#{attempts - 1}) in #{wait}s")
      sleep(wait)
      retry
    end
  end

  # Lists every AAB version code uploaded for the given package (the Play "app bundle explorer"),
  # as an array of integers. Opens a throwaway Play edit and aborts it, so this only reads.
  def available_aab_version_codes(package_name:)
    require 'supply'

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…