Class: Fastlane::Actions::DotgpgEnvironmentAction

Inherits:
Fastlane::Action show all
Defined in:
fastlane/lib/fastlane/actions/dotgpg_environment.rb

Constant Summary

Constants inherited from Fastlane::Action

Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, author, deprecated_notes, lane_context, method_missing, other_action, output, return_type, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text

Class Method Details

.authorsObject



38
39
40
# File 'fastlane/lib/fastlane/actions/dotgpg_environment.rb', line 38

def self.authors
  ["simonlevy5"]
end

.available_optionsObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'fastlane/lib/fastlane/actions/dotgpg_environment.rb', line 23

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :dotgpg_file,
                                 env_name: "DOTGPG_FILE",
                                 description: "Path to your gpg file",
                                 code_gen_sensitive: true,
                                 default_value: Dir["dotgpg/*.gpg"].last,
                                 default_value_dynamic: true,
                                 optional: false,
                                 verify_block: proc do |value|
                                   UI.user_error!("Dotgpg file '#{File.expand_path(value)}' not found") unless File.exist?(value)
                                 end)
  ]
end

.categoryObject



48
49
50
# File 'fastlane/lib/fastlane/actions/dotgpg_environment.rb', line 48

def self.category
  :misc
end

.descriptionObject



15
16
17
# File 'fastlane/lib/fastlane/actions/dotgpg_environment.rb', line 15

def self.description
  "Reads in production secrets set in a dotgpg file and puts them in ENV"
end

.detailsObject



19
20
21
# File 'fastlane/lib/fastlane/actions/dotgpg_environment.rb', line 19

def self.details
  "More information about dotgpg can be found at [https://github.com/ConradIrwin/dotgpg](https://github.com/ConradIrwin/dotgpg)."
end

.example_codeObject



42
43
44
45
46
# File 'fastlane/lib/fastlane/actions/dotgpg_environment.rb', line 42

def self.example_code
  [
    "dotgpg_environment(dotgpg_file: './path/to/gpgfile')"
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:



52
53
54
# File 'fastlane/lib/fastlane/actions/dotgpg_environment.rb', line 52

def self.is_supported?(platform)
  true
end

.run(options) ⇒ Object



7
8
9
10
11
12
13
# File 'fastlane/lib/fastlane/actions/dotgpg_environment.rb', line 7

def self.run(options)
  Actions.verify_gem!('dotgpg')
  require 'dotgpg/environment'

  UI.message("Reading secrets from #{options[:dotgpg_file]}")
  Dotgpg::Environment.new(options[:dotgpg_file]).apply
end