Class: Fastlane::Actions::IncrementVersionCodeInPropertiesFileAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::IncrementVersionCodeInPropertiesFileAction
- Defined in:
- lib/fastlane/plugin/properties/actions/increment_version_code_in_properties_file.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
20 21 22 |
# File 'lib/fastlane/plugin/properties/actions/increment_version_code_in_properties_file.rb', line 20 def self. ["Pavlo Pakholka"] end |
.available_options ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/fastlane/plugin/properties/actions/increment_version_code_in_properties_file.rb', line 33 def self. [ FastlaneCore::ConfigItem.new(key: :key, env_name: "PROPERIES_GET_VALUE_PARAM_KEY", description: "Key of properie in .properties file", optional: false, type: String), FastlaneCore::ConfigItem.new(key: :path, env_name: "PROPERIES_GET_VALUE_PARAM_PATH", description: "Path to .properies file you want to update", type: String, optional: false, verify_block: proc do |value| UI.user_error!("Couldn't find .properties file at path '#{value}'") unless File.exist?(File.(value)) end) ] end |
.description ⇒ Object
16 17 18 |
# File 'lib/fastlane/plugin/properties/actions/increment_version_code_in_properties_file.rb', line 16 def self.description "Increase version code inside .properties file." end |
.details ⇒ Object
28 29 30 31 |
# File 'lib/fastlane/plugin/properties/actions/increment_version_code_in_properties_file.rb', line 28 def self.details # Optional: "" end |
.is_supported?(platform) ⇒ Boolean
51 52 53 54 55 56 57 |
# File 'lib/fastlane/plugin/properties/actions/increment_version_code_in_properties_file.rb', line 51 def self.is_supported?(platform) # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example) # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform # # [:ios, :mac, :android].include?(platform) true end |
.return_value ⇒ Object
24 25 26 |
# File 'lib/fastlane/plugin/properties/actions/increment_version_code_in_properties_file.rb', line 24 def self.return_value "New version code." end |
.run(params) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/fastlane/plugin/properties/actions/increment_version_code_in_properties_file.rb', line 8 def self.run(params) content = JavaProperties.load(params[:path]) value = content[params[:key].to_sym].to_i + 1 content[params[:key].to_sym] = value JavaProperties.write(content, params[:path]) return value end |