Class: Changelog::Notifier::GitTagFetcher
- Inherits:
-
Object
- Object
- Changelog::Notifier::GitTagFetcher
- Defined in:
- lib/changelog/notifier/git_tag_fetcher.rb
Overview
Fetches a Git tag from the current commit being a version.
Class Method Summary collapse
Class Method Details
.fetch(options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/changelog/notifier/git_tag_fetcher.rb', line 9 def self.fetch( = {}) output = [:capistrano].capture( "git --git-dir #{[:path] || '.git'} tag --contains HEAD" ) return nil if output.empty? output.split("\n").detect { |tag| tag =~ /[\d\.]+/ } end |