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
35 36 37 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 35 def self. ['Automattic'] end |
.available_options ⇒ Object
47 48 49 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 47 def self. [] end |
.description ⇒ Object
31 32 33 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 31 def self.description 'Updates the mobile secrets.' end |
.details ⇒ Object
43 44 45 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 43 def self.details 'Pulls down the latest remote changes to the ~/.mobile-secrets repository.' end |
.is_supported?(platform) ⇒ Boolean
51 52 53 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 51 def self.is_supported?(platform) true end |
.return_value ⇒ Object
39 40 41 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 39 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(params = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 8 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
27 28 29 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 27 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.
21 22 23 24 25 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb', line 21 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 |