class Fastlane::Actions::GsIncrementBetaVersionAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/gs_versioning/actions/gs_increment_beta_version.rb, line 36
def self.authors
  ["SAVeselovskiy"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/gs_versioning/actions/gs_increment_beta_version.rb, line 49
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :path,
                                 env_name: "GS_VERSIONS_FILE_PATH",
                                 description: "path to versions file",
                                 optional: false,
                                 type: String),
    FastlaneCore::ConfigItem.new(key: :project_name,
                                 env_name: "ALIAS",
                                 description: "project name for versions file access",
                                 optional: false,
                                 type: String)
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/gs_versioning/actions/gs_increment_beta_version.rb, line 32
def self.description
  "Plugin for GradoService versioning system"
end
details() click to toggle source
# File lib/fastlane/plugin/gs_versioning/actions/gs_increment_beta_version.rb, line 44
def self.details
  # Optional:
  "Plugin for GradoService versioning system"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/gs_versioning/actions/gs_increment_beta_version.rb, line 64
def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
  #
  # [:ios, :mac, :android].include?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/gs_versioning/actions/gs_increment_beta_version.rb, line 40
def self.return_value
  # If your method provides a return value, you can describe here what it does
end
run(params) click to toggle source
# File lib/fastlane/plugin/gs_versioning/actions/gs_increment_beta_version.rb, line 18
def self.run(params)
  require 'json'
  v_beta = Actions::GsGetBetaVersionAction.run(params)
  v_rc = Actions::GsGetRcVersionAction.run(params)
  if v_rc.major > v_beta.major || (v_rc.minor > v_beta.minor && v_rc.major == v_beta.major)
    v_beta.minor = v_rc.minor
    v_beta.major = v_rc.major
    v_beta.build = 0
  end
  v_beta.build += 1
  UI.message("New beta version " + v_beta.to_s)
  v_beta
end