Class: Fastlane::Actions::SyncGitTagsAction

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

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



35
36
37
# File 'lib/fastlane-ext/sync_git_tags.rb', line 35

def self.authors
  %w[sroik]
end

.available_optionsObject



25
26
27
# File 'lib/fastlane-ext/sync_git_tags.rb', line 25

def self.available_options
  []
end

.descriptionObject



17
18
19
# File 'lib/fastlane-ext/sync_git_tags.rb', line 17

def self.description
  'Synchronize git tags with remote'
end

.detailsObject



21
22
23
# File 'lib/fastlane-ext/sync_git_tags.rb', line 21

def self.details
  'Synchronize git tags with remote'
end

.example_codeObject



29
30
31
32
33
# File 'lib/fastlane-ext/sync_git_tags.rb', line 29

def self.example_code
  [
    'sync_git_tags'
  ]
end

.is_supported?(_platform) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/fastlane-ext/sync_git_tags.rb', line 39

def self.is_supported?(_platform)
  true
end

.run(params) ⇒ Object



6
7
8
9
10
11
# File 'lib/fastlane-ext/sync_git_tags.rb', line 6

def self.run(params)
  rm_cmd = 'git tag -d $(git tag -l)'
  fetch_cmd = 'git fetch --prune --tags'
  raise "Failed to remove tags! cmd: '#{rm_cmd}'" unless system(rm_cmd)
  raise "Failed to fetch tags! cmd: '#{fetch_cmd}'" unless system(fetch_cmd)
end