Class: Fastlane::Actions::CommitVersionAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::CommitVersionAction
- Defined in:
- lib/fastlane/plugin/ravn_mobile/actions/commit_version_action.rb
Documentation collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
53 54 55 |
# File 'lib/fastlane/plugin/ravn_mobile/actions/commit_version_action.rb', line 53 def self. ['quebin31'] end |
.available_options ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/fastlane/plugin/ravn_mobile/actions/commit_version_action.rb', line 39 def self. [ FastlaneCore::ConfigItem.new(key: :message, env_name: 'FL_COMMIT_VERSION_MESSAGE', description: 'Commit message', type: String, default_value: 'chore: Version bump'), FastlaneCore::ConfigItem.new(key: :xcodeproj, env_name: 'FL_COMMIT_VERSION_XCODEPROJ', description: 'Xcodeproj if running for iOS', optional: true) ] end |
.description ⇒ Object
31 32 33 |
# File 'lib/fastlane/plugin/ravn_mobile/actions/commit_version_action.rb', line 31 def self.description 'Commit version change for iOS and Android projects' end |
.details ⇒ Object
35 36 37 |
# File 'lib/fastlane/plugin/ravn_mobile/actions/commit_version_action.rb', line 35 def self.details 'Commits changes made to version code, supports Android (via gradle.properties) and iOS' end |
.is_supported?(platform) ⇒ Boolean
57 58 59 |
# File 'lib/fastlane/plugin/ravn_mobile/actions/commit_version_action.rb', line 57 def self.is_supported?(platform) %i[ios android].include?(platform) end |
.run(params) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/fastlane/plugin/ravn_mobile/actions/commit_version_action.rb', line 8 def self.run(params) xcodeproj = params[:xcodeproj] = params[:message] if Helper::FrameworkHelper.is_expo? # noinspection RubyResolve other_action.git_commit(path: ['app.json'], message: ) elsif !blank?(xcodeproj) # noinspection RubyResolve other_action.commit_version_bump(message: , xcodeproj: xcodeproj) else project_dir = Helper::FrameworkHelper.is_react_native? || Helper::FrameworkHelper.is_flutter? ? 'android/' : './' properties_path = File.join(project_dir, 'gradle.properties') # noinspection RubyResolve other_action.git_commit(path: [properties_path], message: ) end end |