class Fastlane::Actions::MakeAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/make/actions/make_action.rb, line 33
def self.authors
  ["xiongzenghui"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/make/actions/make_action.rb, line 45
def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :file,
      description: "where youer Makefile. if this: my_make, then: make -f my_make",
      optional: false,
      verify_block: ->(value) {
        UI.user_error!("file: #{value} not exist") unless File.exist?(value)
      }
    ),
    FastlaneCore::ConfigItem.new(
      key: :target,
      description: "which target will you to make, like: make <all>, defualt: make",
      optional: true
    ),
    FastlaneCore::ConfigItem.new(
      key: :envs,
      description: "setup make enviroment variables",
      optional: true,
      is_string: false
    ),
    FastlaneCore::ConfigItem.new(
      key: :jobs,
      description: "like make -j2",
      optional: true
    )
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/make/actions/make_action.rb, line 29
def self.description
  "Linux GNU Makefile make wrapper"
end
details() click to toggle source
# File lib/fastlane/plugin/make/actions/make_action.rb, line 41
def self.details
  "Linux GNU Makefile make wrapper"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/make/actions/make_action.rb, line 74
def self.is_supported?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/make/actions/make_action.rb, line 37
def self.return_value

end
run(params) click to toggle source
# File lib/fastlane/plugin/make/actions/make_action.rb, line 10
def self.run(params)
  file = params[:file]
  target = params[:target]
  envs = params[:envs]
  jobs = params[:jobs]

  cmds = ['make']
  cmds << "-C #{File.dirname(file)}"
  cmds << "-f #{File.basename(file)}"
  cmds << target if target
  envs.each do |k, v|
    cmds << "#{k.to_s}=#{v}"
  end if envs
  cmds << "-j#{jobs}" if jobs

  # Actions.lane_context[SharedValues::MAKE_OUTPUT] = Actions.sh(cmds.join(' '))
  Actions.sh(cmds.join(' '))
end