Class: Fastlane::Actions::PubReleaseAction

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

Class Method Summary collapse

Class Method Details

.authorsObject



27
28
29
# File 'lib/fastlane/plugin/sunny_project/actions/pub_release_action.rb', line 27

def self.authors
  ["ericmartineau"]
end

.available_optionsObject



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

def self.available_options
  opts = [
    FastlaneCore::ConfigItem.new(key: :skip_dirty_check,
                                 description: "Whether to skip dirty repo check",
                                 optional: true, type: Object),

  ]
  Fastlane::Actions::FinalizeVersionAction.available_options.each do |option|
    opts.push(option)
  end
  Fastlane::Actions::IncreaseVersionAction.available_options.each do |option|
    opts.push(option)
  end
  Fastlane::Actions::ReleaseNotesAction.available_options.each do |option|
    opts.push(option)
  end
  opts
end

.descriptionObject



23
24
25
# File 'lib/fastlane/plugin/sunny_project/actions/pub_release_action.rb', line 23

def self.description
  "Releases a dart package"
end

.detailsObject



35
36
37
38
# File 'lib/fastlane/plugin/sunny_project/actions/pub_release_action.rb', line 35

def self.details
  # Optional:
  ""
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


59
60
61
62
63
64
65
# File 'lib/fastlane/plugin/sunny_project/actions/pub_release_action.rb', line 59

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



31
32
33
# File 'lib/fastlane/plugin/sunny_project/actions/pub_release_action.rb', line 31

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

.run(options) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/fastlane/plugin/sunny_project/actions/pub_release_action.rb', line 8

def self.run(options)
  unless options[:skip_dirty_check]
    Sunny.run_action(EnsureGitStatusCleanAction)
  end

  Sunny.do_increase_version(options)
  # Whatever happened with the incrementing, this is the build number we're
  # going with
  changes = Sunny.release_notes(options)
  puts(changes)

  Sunny.exec_cmd("pub publish", "pub publish -f")
  Sunny.finalize_version(options)
end