Class: Fastlane::Actions::ConfigureDownloadAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::ConfigureDownloadAction
- Defined in:
- lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params = {}) ⇒ Object
- .secrets_dir ⇒ Object
-
.update_repository ⇒ Object
Ensure the git repository at ‘~/.mobile-secrets` is up to date.
Class Method Details
.authors ⇒ Object
37 38 39 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 37 def self. ['Automattic'] end |
.available_options ⇒ Object
49 50 51 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 49 def self. [] end |
.description ⇒ Object
33 34 35 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 33 def self.description 'Updates the mobile secrets.' end |
.details ⇒ Object
45 46 47 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 45 def self.details 'Pulls down the latest remote changes to the ~/.mobile-secrets repository.' end |
.is_supported?(platform) ⇒ Boolean
53 54 55 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 53 def self.is_supported?(platform) true end |
.return_value ⇒ Object
41 42 43 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 41 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(params = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 10 def self.run(params = {}) UI. 'Running Configure Download' # If the `~/.mobile-secrets` repository doesn't exist if File.directory?(secrets_dir) update_repository # If the repo already exists, just update it else UI.user_error!("The local secrets store does not exist. Please clone it to #{secrets_dir} before continuing.") end end |
.secrets_dir ⇒ Object
29 30 31 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 29 def self.secrets_dir Fastlane::Helper::FilesystemHelper.secret_store_dir end |
.update_repository ⇒ Object
Ensure the git repository at ‘~/.mobile-secrets` is up to date. If the secrets repo is in a detached HEAD state, skip the pull, since it will fail.
23 24 25 26 27 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 23 def self.update_repository secrets_repo_branch = Fastlane::Helper::ConfigureHelper.repo_branch_name sh("cd #{secrets_dir} && git pull") unless secrets_repo_branch.nil? end |