Class: Fastlane::Actions::TagReleaseAction

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

documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



55
56
57
58
# File 'lib/fastlane/plugin/react_native_release/actions/tag_release.rb', line 55

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

.available_optionsObject



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/fastlane/plugin/react_native_release/actions/tag_release.rb', line 30

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :tag_prefix,
                                 env_name: "FL_TAG_RELEASE_TAG_PREFIX",
                                 description: "The prefix for tags (ex. ios/beta, android/beta)",
                                 type: String),
    FastlaneCore::ConfigItem.new(key: :next_version,
                                 env_name: "FL_TAG_RELEASE_NEXT_VERSION",
                                 description: "The next version to release",
                                 type: String),
    FastlaneCore::ConfigItem.new(key: :build_number,
                                 env_name: "FL_TAG_RELEASE_BUILD_NUMBER",
                                 description: "The current build number from CI",
                                 type: String)
  ]
end

.descriptionObject



22
23
24
# File 'lib/fastlane/plugin/react_native_release/actions/tag_release.rb', line 22

def self.description
  "Tags a release based on a prefix, version, and build numbers"
end

.detailsObject



26
27
28
# File 'lib/fastlane/plugin/react_native_release/actions/tag_release.rb', line 26

def self.details
  # TODO
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/fastlane/plugin/react_native_release/actions/tag_release.rb', line 60

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

.return_valueObject



47
48
49
# File 'lib/fastlane/plugin/react_native_release/actions/tag_release.rb', line 47

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

.run(params) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/fastlane/plugin/react_native_release/actions/tag_release.rb', line 6

def self.run(params)
  tag_prefix = params[:tag_prefix]
  next_version = params[:next_version]
  build_number = params[:build_number]

  # Create tag to represent the new version
  # TODO handle the case of not having proper git permissions
  other_action.add_git_tag(tag: "#{tag_prefix}/#{next_version}/#{build_number}")
  other_action.push_git_tags
  other_action.push_to_git_remote
end