Sha256: 7df7bb3394944bc0d09118c8cef1155acd792e1e83746b671f936f853e3691b4

Contents?: true

Size: 680 Bytes

Versions: 24

Compression:

Stored size: 680 Bytes

Contents

require 'albacore'
require 'xsemver'

module Albacore::Tools
  # Try to get the release notes from git, but looking at the commit messages
  def self.git_release_notes
    tags = `git tag`.split(/\n/).
              map { |tag| [ ::XSemVer::SemVer.parse_rubygems(tag), tag ] }.
              sort { |a, b| a <=> b }.
              map { |_, tag| tag }
    last_tag = tags[-1]
    # second_last_tag = tags[-2] || `git rev-list --max-parents=0 HEAD`
    # logs = `git log --pretty=format:%s #{second_last_tag}..`.split(/\n/)
    logs = `git log --pretty=format:%s #{last_tag}..`.split(/\n/)
    "Release Notes:
#{logs.inject('') { |state, line| state + "\n * #{line}" }}"
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
albacore-2.5.10 ./lib/albacore/tools.rb
albacore-2.5.9 ./lib/albacore/tools.rb
albacore-2.5.8 ./lib/albacore/tools.rb
albacore-2.5.6 lib/albacore/tools.rb
albacore-2.5.5 lib/albacore/tools.rb
albacore-2.5.4 lib/albacore/tools.rb
albacore-2.5.3 lib/albacore/tools.rb
albacore-2.5.2 lib/albacore/tools.rb
albacore-2.5.1 lib/albacore/tools.rb
albacore-2.5.0 lib/albacore/tools.rb
albacore-2.4.3 lib/albacore/tools.rb
albacore-2.4.2 lib/albacore/tools.rb
albacore-2.4.1 lib/albacore/tools.rb
albacore-2.4.0 lib/albacore/tools.rb
albacore-2.3.22 lib/albacore/tools.rb
albacore-2.3.21 lib/albacore/tools.rb
albacore-2.3.20 lib/albacore/tools.rb
albacore-2.3.19 lib/albacore/tools.rb
albacore-2.3.18 lib/albacore/tools.rb
albacore-2.3.17 lib/albacore/tools.rb