Class: Fastlane::Actions::FivVersionAction

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

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



99
100
101
102
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_version.rb', line 99

def self.authors
  # So no one will ever forget your contribution to fastlane :) You are awesome btw!
  ["Your GitHub/Twitter Name"]
end

.available_optionsObject



42
43
44
45
46
47
48
49
50
51
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
80
81
82
83
84
85
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_version.rb', line 42

def self.available_options
  # Define all options your action supports. 
  
  # Below a few examples
  [
    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),
        FastlaneCore::ConfigItem.new(key: :local_branch,
                                 env_name: "FL_GIT_PUSH_LOCAL_BRANCH",
                                 description: "The local branch to push from. Defaults to the current branch",
                                 default_value_dynamic: true,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :remote_branch,
                                 env_name: "FL_GIT_PUSH_REMOTE_BRANCH",
                                 description: "The remote branch to push to. Defaults to the local branch",
                                 default_value_dynamic: true,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :force,
                                 env_name: "FL_PUSH_GIT_FORCE",
                                 description: "Force push to remote",
                                 is_string: false,
                                 default_value: false),
    FastlaneCore::ConfigItem.new(key: :tags,
                                 env_name: "FL_PUSH_GIT_TAGS",
                                 description: "Whether tags are pushed to remote",
                                 is_string: false,
                                 default_value: true),
    FastlaneCore::ConfigItem.new(key: :remote,
                                 env_name: "FL_GIT_PUSH_REMOTE",
                                 description: "The remote to push to",
                                 default_value: 'origin')
  ]
end

.descriptionObject



32
33
34
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_version.rb', line 32

def self.description
  "A short description with <= 80 characters of what this action does"
end

.detailsObject



36
37
38
39
40
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_version.rb', line 36

def self.details
  # Optional:
  # this is your chance to provide a more detailed description of this action
  "You can use this action to do cool things..."
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


104
105
106
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_version.rb', line 104

def self.is_supported?(platform)
 platform == :android
end

.outputObject



87
88
89
90
91
92
93
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_version.rb', line 87

def self.output
  # Define the shared values you are going to provide
  # Example
  [
    ['FIV_BUILD_IONIC_ANDROID_CUSTOM_VALUE', 'A description of what this value contains']
  ]
end

.return_valueObject



95
96
97
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_version.rb', line 95

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
18
19
20
21
22
23
24
25
26
# File 'lib/fastlane/plugin/fivethree_ionic/actions/fiv_version.rb', line 8

def self.run(params)
  version_and_build_no = Fastlane::Actions::FivUpdateVersionAndBuildNoAction.run(ios: params[:ios],pathToConfigXML:params[:pathToConfigXML])
  
  Fastlane::Actions::FivBumpVersionAction.run(
    message: "Version Bump: build #{version_and_build_no[:build_no]}, version: #{version_and_build_no[:version]}"
    )


    Fastlane::Actions::PushToGitRemoteAction.run(
      remote: params[:remote],
      local_branch: params[:local_branch],
      remote_branch: params[:remote_branch],
      force: params[:force],
      tags: params[:tags]
    )

    return version_and_build_no

end