Class: Fastlane::Actions::RunHighwayAction

Inherits:
Action
  • Object
show all
Defined in:
lib/highway/fastlane/action.rb

Overview

The ‘run_highway` action that can be used inside Fastline.

Class Method Summary collapse

Class Method Details

.available_optionsArray<FastlaneCore::ConfigItem>

Available options of ‘run_highway` action.

Use the same behavior of computing option values as in lane entry point. First, get the actual values, then fall back to env variables, then fall back to default values.

Returns:

  • (Array<FastlaneCore::ConfigItem>)


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/highway/fastlane/action.rb', line 22

def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :highwayfile,
      description: "Path to Highway configuration file",
      type: String,
      optional: false,
      env_name: "HIGHWAY_HIGHWAYFILE",
      default_value: "Highwayfile.yml",
    ),
    FastlaneCore::ConfigItem.new(
      key: :preset,
      description: "Highway preset to run",
      type: String,
      optional: false,
      env_name: "HIGHWAY_PRESET",
      default_value: "default",
    ),
  ]
end

.run(options) ⇒ Object

Execute the ‘run_highway` action.

This is the main entry point of Highway.

Parameters:

  • options (Hash<String, Object>)


48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/highway/fastlane/action.rb', line 48

def self.run(options)

  # Run Highway from `:action` entry point.

  main = Highway::Main.new(
    entrypoint: :action,
    path: options[:highwayfile],
    preset: options[:preset],
    fastlane_runner: runner,
    fastlane_lane_context: lane_context,
  )

  main.run()

end