Class: Fastlane::Actions::AndroidFinalizePrechecksAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::AndroidFinalizePrechecksAction
- Defined in:
- lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb
Documentation collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .output ⇒ Object
- .return_value ⇒ Object
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
88 89 90 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb', line 88 def self. ['Automattic'] end |
.available_options ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb', line 52 def self. # Define all options your action supports. # Below a few examples [ FastlaneCore::ConfigItem.new(key: :skip_confirm, env_name: 'FL_ANDROID_FINALIZE_PRECHECKS_SKIPCONFIRM', description: 'Skips confirmation', type: Boolean, default_value: false), # the default value if the user didn't provide one FastlaneCore::ConfigItem.new(key: :build_gradle_path, description: 'Path to the build.gradle file', type: String, optional: true, conflicting_options: %i[project_name project_root_folder version_properties_path]), FastlaneCore::ConfigItem.new(key: :version_properties_path, description: 'Path to the version.properties file', type: String, optional: true, conflicting_options: %i[build_gradle_path project_name project_root_folder]), Fastlane::Helper::Deprecated.project_root_folder_config_item, Fastlane::Helper::Deprecated.project_name_config_item, ] end |
.description ⇒ Object
44 45 46 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb', line 44 def self.description 'Runs some prechecks before finalizing a release' end |
.details ⇒ Object
48 49 50 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb', line 48 def self.details 'Runs some prechecks before finalizing a release' end |
.is_supported?(platform) ⇒ Boolean
92 93 94 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb', line 92 def self.is_supported?(platform) platform == :android end |
.output ⇒ Object
81 82 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb', line 81 def self.output end |
.return_value ⇒ Object
84 85 86 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb', line 84 def self.return_value 'The current app version' end |
.run(params) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb', line 8 def self.run(params) UI. "Skip confirm: #{params[:skip_confirm]}" require_relative '../../helper/android/android_version_helper' require_relative '../../helper/android/android_git_helper' require_relative '../../helper/git_helper' current_branch = Fastlane::Helper::GitHelper.current_git_branch UI.user_error!("Current branch - '#{current_branch}' - is not a release branch. Abort.") unless current_branch.start_with?('release/') project_root_folder = params[:project_root_folder] project_name = params[:project_name] build_gradle_path = params[:build_gradle_path] || (File.join(project_root_folder || '.', project_name, 'build.gradle') unless project_name.nil?) version_properties_path = params[:version_properties_path] || File.join(project_root_folder || '.', 'version.properties') version = Fastlane::Helper::Android::VersionHelper.get_public_version( build_gradle_path: build_gradle_path, version_properties_path: version_properties_path ) = "Finalizing release: #{version}\n" if params[:skip_confirm] UI.() else UI.user_error!('Aborted by user request') unless UI.confirm("#{}Do you want to continue?") end # Check local repo status other_action.ensure_git_status_clean version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME] end |