-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from Fueled/secrets
feat(secrets): add action to generate ArkanaKeys package
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
lib/fastlane/plugin/fueled/actions/generate_secrets_ios.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
module Fastlane | ||
module Actions | ||
module SharedValues | ||
end | ||
|
||
class GenerateSecretsIosAction < Action | ||
def self.run(params) | ||
template_file = params[:template_file] | ||
environment_file = params[:environment_file] | ||
UI.message("Generating ArkanaKeys Package") | ||
sh("bundle exec arkana -c #{template_file} -e #{environment_file}") | ||
end | ||
|
||
##################################################### | ||
# @!group Documentation | ||
##################################################### | ||
|
||
def self.description | ||
"Generate ArkanaKeys Package with project secrets" | ||
end | ||
|
||
def self.available_options | ||
[ | ||
FastlaneCore::ConfigItem.new( | ||
key: :template_file, | ||
env_name: "ARKANA_TEMPLATE_FILE", | ||
description: "The template file used to generate the Arkana Keys Package", | ||
is_string: true, | ||
default_value: ".arkana.yml" | ||
), | ||
FastlaneCore::ConfigItem.new( | ||
key: :environment_file, | ||
env_name: "ARKANA_ENVIRONMENT_FILE", | ||
description: "The environment file containing the secrets", | ||
is_string: true, | ||
default_value: ".env.arkana_ci" | ||
) | ||
] | ||
end | ||
|
||
def self.authors | ||
["fueled"] | ||
end | ||
|
||
def self.is_supported?(platform) | ||
[:ios, :mac].include?(platform) | ||
end | ||
end | ||
end | ||
end | ||
|