Class: Fastlane::Actions::ReleaseVersionAction

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

Class Method Summary collapse

Class Method Details

.authorObject



16
17
18
# File 'lib/fastlane/plugin/release_version/actions/release_version_action.rb', line 16

def self.author
  "Leon Keijzer"
end

.available_optionsObject



32
33
34
35
36
37
38
39
40
41
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
# File 'lib/fastlane/plugin/release_version/actions/release_version_action.rb', line 32

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :app_identifier,
                               description: "The bundle identifier of your app",
                               optional: true,
                               code_gen_sensitive: true,
                               default_value_dynamic: true),
    FastlaneCore::ConfigItem.new(key: :app_version,
                                 description: "The version that should be edited or created",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :ipa,
                                 optional: true,
                                 env_name: "DELIVER_IPA_PATH",
                                 description: "Path to your ipa file",
                                 code_gen_sensitive: true,
                                 # default_value: Dir["*.ipa"].sort_by { |x| File.mtime(x) }.last,
                                 default_value_dynamic: true,
                                 verify_block: proc do |value|
                                   UI.user_error!("Could not find ipa file at path '#{File.expand_path(value)}'") unless File.exist?(value)
                                   UI.user_error!("'#{value}' doesn't seem to be an ipa file") unless value.end_with?(".ipa")
                                 end,
                                 conflict_block: proc do |value|
                                   UI.user_error!("You can't use 'ipa' and '#{value.key}' options in one run.")
                                 end),
    FastlaneCore::ConfigItem.new(key: :platform,
                                 env_name: "DELIVER_PLATFORM",
                                 description: "The platform to use (optional)",
                                 optional: true,
                                 default_value: "ios",
                                 verify_block: proc do |value|
                                   UI.user_error!("The platform can only be ios, appletvos, or osx") unless %('ios', 'appletvos', 'osx').include?(value)
                                 end),
    #Login credentials
    FastlaneCore::ConfigItem.new(key: :username,
                                 env_name: "DELIVER_USERNAME",
                                 description: "Your Apple ID Username",
                                 default_value: ENV["DELIVER_USER"],
                                 default_value_dynamic: true),
    # internal
    FastlaneCore::ConfigItem.new(key: :app,
                                 short_option: "-p",
                                 env_name: "DELIVER_APP_ID",
                                 description: "The (spaceship) app ID of the app you want to use/modify",
                                 optional: true,
                                 is_string: false) # don't add any verification here, as it's used to store a spaceship ref
  ]
end

.descriptionObject



12
13
14
# File 'lib/fastlane/plugin/release_version/actions/release_version_action.rb', line 12

def self.description
  "This plugin makes it possible to release an already approved version in AppStore Connect"
end

.detailsObject



24
25
26
27
28
29
30
# File 'lib/fastlane/plugin/release_version/actions/release_version_action.rb', line 24

def self.details
  [
      "This plug can be used with an IPA file or just the application identifier.",
      "If the IPA is provided the app_identifier is extracted from that.",
      "This plugin only works for apps that are already approved but not release automatically."
  ].join(' ')
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


80
81
82
83
# File 'lib/fastlane/plugin/release_version/actions/release_version_action.rb', line 80

def self.is_supported?(platform)
  [:ios, :mac].include? platform
  true
end

.return_valueObject



20
21
22
# File 'lib/fastlane/plugin/release_version/actions/release_version_action.rb', line 20

def self.return_value
  # If your method provides a return value, you can describe here what it does
end

.run(params) ⇒ Object



7
8
9
10
# File 'lib/fastlane/plugin/release_version/actions/release_version_action.rb', line 7

def self.run(params)
  helper = Helper::ReleaseVersionHelper.new(params)
  return helper.release
end