class Fastlane::Actions::LatestTestflightBuildNumberAction
Public Class Methods
available_options()
click to toggle source
# File fastlane/lib/fastlane/actions/latest_testflight_build_number.rb, line 30 def self.available_options user = CredentialsManager::AppfileConfig.try_fetch_value(:itunes_connect_id) user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id) [ FastlaneCore::ConfigItem.new(key: :live, short_option: "-l", env_name: "CURRENT_BUILD_NUMBER_LIVE", description: "Query the live version (ready-for-sale)", optional: true, is_string: false, default_value: false), FastlaneCore::ConfigItem.new(key: :app_identifier, short_option: "-a", env_name: "FASTLANE_APP_IDENTIFIER", description: "The bundle identifier of your app", code_gen_sensitive: true, default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier), default_value_dynamic: true), FastlaneCore::ConfigItem.new(key: :username, short_option: "-u", env_name: "ITUNESCONNECT_USER", description: "Your Apple ID Username", default_value: user, default_value_dynamic: true), FastlaneCore::ConfigItem.new(key: :version, env_name: "LATEST_VERSION", description: "The version number whose latest build number we want", optional: true), FastlaneCore::ConfigItem.new(key: :platform, short_option: "-j", env_name: "APPSTORE_PLATFORM", description: "The platform to use (optional)", optional: true, is_string: true, default_value: "ios", verify_block: proc do |value| UI.user_error!("The platform can only be ios, or appletvos") unless %('ios', 'appletvos').include?(value) end), FastlaneCore::ConfigItem.new(key: :initial_build_number, env_name: "INITIAL_BUILD_NUMBER", description: "sets the build number to given value if no build is in current train", default_value: 1, is_string: false), FastlaneCore::ConfigItem.new(key: :team_id, short_option: "-k", env_name: "LATEST_TESTFLIGHT_BUILD_NUMBER_TEAM_ID", description: "The ID of your App Store Connect team if you're in multiple teams", optional: true, is_string: false, # as we also allow integers, which we convert to strings anyway code_gen_sensitive: true, default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_id), default_value_dynamic: true), FastlaneCore::ConfigItem.new(key: :team_name, short_option: "-e", env_name: "LATEST_TESTFLIGHT_BUILD_NUMBER_TEAM_NAME", description: "The name of your App Store Connect team if you're in multiple teams", optional: true, code_gen_sensitive: true, default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_name), default_value_dynamic: true) ] end
category()
click to toggle source
# File fastlane/lib/fastlane/actions/latest_testflight_build_number.rb, line 129 def self.category :app_store_connect end
description()
click to toggle source
@!group Documentation
# File fastlane/lib/fastlane/actions/latest_testflight_build_number.rb, line 19 def self.description "Fetches most recent build number from TestFlight" end
details()
click to toggle source
# File fastlane/lib/fastlane/actions/latest_testflight_build_number.rb, line 23 def self.details [ "Provides a way to have `increment_build_number` be based on the latest build you uploaded to iTC.", "Fetches the most recent build number from TestFlight based on the version number. Provides a way to have `increment_build_number` be based on the latest build you uploaded to iTC." ].join("\n") end
example_code()
click to toggle source
# File fastlane/lib/fastlane/actions/latest_testflight_build_number.rb, line 116 def self.example_code [ 'latest_testflight_build_number(version: "1.3")', 'increment_build_number({ build_number: latest_testflight_build_number + 1 })' ] end
is_supported?(platform)
click to toggle source
# File fastlane/lib/fastlane/actions/latest_testflight_build_number.rb, line 112 def self.is_supported?(platform) platform == :ios end
output()
click to toggle source
# File fastlane/lib/fastlane/actions/latest_testflight_build_number.rb, line 94 def self.output [ ['LATEST_TESTFLIGHT_BUILD_NUMBER', 'The latest build number of the latest version of the app uploaded to TestFlight'] ] end
return_type()
click to toggle source
# File fastlane/lib/fastlane/actions/latest_testflight_build_number.rb, line 104 def self.return_type :int end
return_value()
click to toggle source
# File fastlane/lib/fastlane/actions/latest_testflight_build_number.rb, line 100 def self.return_value "Integer representation of the latest build number uploaded to TestFlight" end
run(params)
click to toggle source
# File fastlane/lib/fastlane/actions/latest_testflight_build_number.rb, line 10 def self.run(params) build_number = AppStoreBuildNumberAction.run(params) Actions.lane_context[SharedValues::LATEST_TESTFLIGHT_BUILD_NUMBER] = build_number end
sample_return_value()
click to toggle source
# File fastlane/lib/fastlane/actions/latest_testflight_build_number.rb, line 125 def self.sample_return_value 2 end