Class: Fastlane::Actions::AppReleaseAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane-ext/app_release.rb

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



86
87
88
# File 'lib/fastlane-ext/app_release.rb', line 86

def self.authors
  %w[sroik]
end

.available_optionsObject



30
31
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
# File 'lib/fastlane-ext/app_release.rb', line 30

def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :schemes,
      description: 'schemes',
      type: Array,
      verify_block: proc do |value|
        msg = 'invalid or empty schemes'
        UI.user_error!(msg) if value.empty?
      end
    ),
    FastlaneCore::ConfigItem.new(
      key: :project,
      description: 'path to xcodeproj',
      default_value: Dir.glob('*.xcodeproj').first,
      verify_block: proc do |value|
        msg = 'xcodeproj not found'
        UI.user_error!(msg) unless File.directory?(value)
      end
    ),
    FastlaneCore::ConfigItem.new(
      key: :branch,
      description: 'branch',
      default_value: 'main',
      verify_block: proc do |value|
        UI.user_error!('invalid branch') if value.empty?
      end
    ),
    FastlaneCore::ConfigItem.new(
      key: :version,
      description: 'app version (like 1.1.0)',
      optional: true
    ),
    FastlaneCore::ConfigItem.new(
      key: :target_suffix,
      description: 'Specific target suffix',
      optional: true
    )
  ]
end

.categoryObject



94
95
96
# File 'lib/fastlane-ext/app_release.rb', line 94

def self.category
  :notifications
end

.descriptionObject



22
23
24
# File 'lib/fastlane-ext/app_release.rb', line 22

def self.description
  'Release app according to the version'
end

.detailsObject



26
27
28
# File 'lib/fastlane-ext/app_release.rb', line 26

def self.details
  'Release app according to the version'
end

.example_codeObject



71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/fastlane-ext/app_release.rb', line 71

def self.example_code
  [
    'app_release(
      schemes: ["AppScheme", "AppExtension"]
    )',
    'app_release(
      schemes: ["AppScheme", "AppExtension"],
      project: "/path/to/xcodeproj",
      branch: "main",
      version: "2.3.0",
      target_suffix: "_sfx"
    )'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


90
91
92
# File 'lib/fastlane-ext/app_release.rb', line 90

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

.run(params) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/fastlane-ext/app_release.rb', line 8

def self.run(params)
  FastlaneExt::AppReleaseManager.new(
    params[:schemes],
    params[:project],
    params[:branch],
    params[:version],
    params[:target_suffix]
  ).release
end