class Changelog::Notifier::GitTagFetcher
Fetches a Git tag from the current commit being a version.
Public Class Methods
fetch(options = {})
click to toggle source
# File lib/changelog/notifier/git_tag_fetcher.rb, line 9 def self.fetch(options = {}) output = options[:capistrano].capture( "git --git-dir #{options[:path] || '.'} tag --contains HEAD" ) return nil if output.empty? output.split("\n").detect { |tag| tag =~ /[\d\.]+/ } end