Class: Fastlane::Actions::IosValidateCiBuildAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



37
38
39
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb', line 37

def self.authors
  ['Automattic']
end

.available_optionsObject



27
28
29
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb', line 27

def self.available_options
  []
end

.descriptionObject



19
20
21
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb', line 19

def self.description
  'Validate the build on CI environment'
end

.detailsObject



23
24
25
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb', line 23

def self.details
  'Validate the build on CI environment'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb', line 41

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

.outputObject



31
32
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb', line 31

def self.output
end

.return_valueObject



34
35
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb', line 34

def self.return_value
end

.run(params) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb', line 4

def self.run(params)
  require_relative '../../helper/ios/ios_git_helper'
  require_relative '../../helper/ios/ios_version_helper'

  version = Fastlane::Helper::Ios::VersionHelper.get_public_version()
  head_tags = Fastlane::Helper::GitHelper.list_tags_on_current_commit()
  UI.user_error!('HEAD is not on tag. Aborting!') if head_tags.empty?

  return head_tags.include?(version) # Current commit is tagged with "version" tag
end