Class: Fastlane::Actions::GsAfterAllAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/gs_project_flow_ios/actions/gs_after_all_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject



45
46
47
# File 'lib/fastlane/plugin/gs_project_flow_ios/actions/gs_after_all_action.rb', line 45

def self.authors
  ["Сергей Веселовский"]
end

.available_optionsObject



58
59
60
61
62
63
64
65
# File 'lib/fastlane/plugin/gs_project_flow_ios/actions/gs_after_all_action.rb', line 58

def self.available_options
  [
      FastlaneCore::ConfigItem.new(key: :lane,
                                   description: "A description of your option",
                                   optional: false,
                                   type: Symbol)
  ]
end

.descriptionObject



41
42
43
# File 'lib/fastlane/plugin/gs_project_flow_ios/actions/gs_after_all_action.rb', line 41

def self.description
  "Plugin contains project flow code for code sharing between projects"
end

.detailsObject



53
54
55
56
# File 'lib/fastlane/plugin/gs_project_flow_ios/actions/gs_after_all_action.rb', line 53

def self.details
  # Optional:
  "Plugin contains project flow code for code sharing between GradoService projects"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


67
68
69
70
71
72
73
# File 'lib/fastlane/plugin/gs_project_flow_ios/actions/gs_after_all_action.rb', line 67

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_valueObject



49
50
51
# File 'lib/fastlane/plugin/gs_project_flow_ios/actions/gs_after_all_action.rb', line 49

def self.return_value
  # If your method provides a return value, you can describe here what it does
end

.run(params) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/fastlane/plugin/gs_project_flow_ios/actions/gs_after_all_action.rb', line 4

def self.run(params)
  version_name, v = Helper::GsProjectFlowIosHelper.version_for_lane(params[:lane],Helper::GsProjectFlowIosHelper::BuildState::SUCCESS)
  message = ENV["PROJECT_NAME"] + " " + version_name + "<pre> build successful.</pre>"
  Helper::GsProjectFlowIosHelper.send_report(message,Helper::GsProjectFlowIosHelper::BuildState::SUCCESS,params[:lane])
  cmd = ""
  options = {}
  if params[:lane] == :beta
    cmd = "beta"
    options = {cmd:cmd,
               displayVersionName:version_name,
               request: "cmd",
               alias: ENV["ALIAS"]
    }
  elsif params[:lane] == :rc
    cmd = "rc"
    options = {
        cmd: cmd,
        displayVersionName: version_name,
        buildNumber: v.build,
        request: "cmd",
        alias: ENV["ALIAS"]
    }
  elsif params[:lane] == :release
    cmd = "rc2release"
    options = {cmd:cmd,
               displayVersionName:version_name,
               buildNumber:v.build,
               request: "cmd",
               alias: ENV["ALIAS"]
    }

  end
  if cmd != ""
    Actions::GsExecuteCommandAction.run(FastlaneCore::Configuration.create(GsExecuteCommandAction.available_options,options))
  end
end