Class: Fastlane::Actions::FivUpdateVersionAndBuildNoAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version_and_build_no.rb

Class Method Summary collapse

Class Method Details

.authorsObject



25
26
27
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version_and_build_no.rb', line 25

def self.authors
  ["Fivethree"]
end

.available_optionsObject



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version_and_build_no.rb', line 39

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :ios,
                            env_name: "FIV_INCREMENT_BUILD_NO_IOS",
                         description: "---",
                            optional: false,
                                type: Boolean),
    FastlaneCore::ConfigItem.new(key: :pathToConfigXML,
    env_name: "FIV_INCREMENT_BUILD_CONFIG",
 description: "---",
    optional: false,
    verify_block: proc do | value |
      UI.user_error!("Couldnt find config.xml! Please change your path.") unless File.exist?(value)
    end  ,
        type: String)
  ]
end

.descriptionObject



21
22
23
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version_and_build_no.rb', line 21

def self.description
  "Fastlane plugin for Ionic v4 Projects"
end

.detailsObject



34
35
36
37
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version_and_build_no.rb', line 34

def self.details
  # Optional:
  "Fastlane"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


57
58
59
60
61
62
63
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version_and_build_no.rb', line 57

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_valueObject



29
30
31
32
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version_and_build_no.rb', line 29

def self.return_value
  # If your method provides a return value, you can describe here what it does
  "returns object containing version and build_no"
end

.run(params) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_update_version_and_build_no.rb', line 9

def self.run(params)
  
  version = Fastlane::Actions::FivUpdateVersionAction.run(pathToConfigXML:params[:pathToConfigXML])
  build_no = Fastlane::Actions::FivIncrementBuildNoAction.run(
    pathToConfigXML: params[:pathToConfigXML],
    ios: params[:ios]
  )

  return {version: version, build_no: build_no}

end