Sha256: 639e4972f34aa712f3a13a309e88988acbd0779daf44eda4735537653b60c08c

Contents?: true

Size: 601 Bytes

Versions: 4

Compression:

Stored size: 601 Bytes

Contents

#!/usr/bin/env ruby

require 'tins'
require 'term/ansicolor'
class String
  include Term::ANSIColor
  include Tins::StringVersion
end
require 'shellwords'

args = ARGV.dup
args.empty? and args.concat %w[ --color --stat ]

regexp = ENV['GIT_VERSIONS_REGEXP']
regexp = regexp ? Regexp.new(regexp) : /^v((?:\d+\.)*\d+)/

versions = `git tag`.lines.map(&:chomp).grep(regexp).sort_by { |x|
  x[regexp, 1].version
}.reverse

git_options = args.empty? ? ' ' : " #{Shellwords.join(args)} "
versions.each_cons(2) do |new, old|
  puts "Version #{new}".red.bold
  puts `git log #{git_options}#{old}..#{new}`
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
utils-0.63.0 bin/git-versions
utils-0.62.0 bin/git-versions
utils-0.61.0 bin/git-versions
utils-0.60.2 bin/git-versions