Class: SemanticRelease::Updaters::GitTag
- Inherits:
-
BaseUpdater
- Object
- BaseUpdater
- SemanticRelease::Updaters::GitTag
- Defined in:
- lib/semantic_release/updaters/git_tag.rb
Class Method Summary collapse
-
.update ⇒ Object
rubocop:disable Style/GuardClause.
Methods inherited from BaseUpdater
current_version, current_version_tag, gemspec_present?, semver_file
Class Method Details
.update ⇒ Object
rubocop:disable Style/GuardClause
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/semantic_release/updaters/git_tag.rb', line 7 def self.update tag = current_version_tag msg = "Increment version to #{tag}" `git add #{semver_file} && git commit -m '#{msg}' && git tag #{tag} -a -m '#{Time.now}'` branch = `git rev-parse --abbrev-ref HEAD`.chomp puts "To push the new tag, use 'git push origin #{branch} --tags'" if gemspec_present? && !SemanticRelease.configuration. puts "To build and push the .gem file to rubygems.org use, 'bundle exec rake release'" end end |