class Fastlane::Actions::CodePushPromoteAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/code_push/actions/code_push_promote_action.rb, line 17
def self.authors
  ["Manuel Koch"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/code_push/actions/code_push_promote_action.rb, line 28
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :app_name,
                                env_name: "FASTLANE_CODE_PUSH_APP_NAME",
                                type: String,
                                optional: false,
                                description: "CodePush app name for promoting to"),
    FastlaneCore::ConfigItem.new(key: :from,
                                type: String,
                                optional: true,
                                default_value: "Staging",
                                description: "sourceDeploymentName"),
    FastlaneCore::ConfigItem.new(key: :to,
                                 type: String,
                                 optional: true,
                                 default_value: "Production",
                                 description: "destDeploymentName"),
    FastlaneCore::ConfigItem.new(key: :dry_run,
                                 description: "Print the command that would be run, and don't run it",
                                 is_string: false,
                                 default_value: false)
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/code_push/actions/code_push_promote_action.rb, line 13
def self.description
  "CodePush promote"
end
details() click to toggle source
# File lib/fastlane/plugin/code_push/actions/code_push_promote_action.rb, line 24
def self.details
  "CodePush promote functionality"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/code_push/actions/code_push_promote_action.rb, line 52
def self.is_supported?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/code_push/actions/code_push_promote_action.rb, line 21
def self.return_value
end
run(params) click to toggle source
# File lib/fastlane/plugin/code_push/actions/code_push_promote_action.rb, line 4
def self.run(params)
  command = "code-push promote #{params[:app_name]} #{params[:from]} #{params[:to]}"
  if params[:dry_run]
    UI.message("Dry run!".red + " Would have run: " + command + "\n")
  else
    sh(command.to_s)
  end
end