Sha256: c4c6b62119cbcccadf7f107ff1696e0c0d290c95b4adaa7636a2daa250f5923b

Contents?: true

Size: 715 Bytes

Versions: 14

Compression:

Stored size: 715 Bytes

Contents

# Encoding: utf-8
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}..`.encode!('UTF-8').split(/\n/)
    "Release Notes:
#{logs.inject('') { |state, line| state + "\n * #{line}" }}"
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
albacore-3.0.0.pre.alpha ./lib/albacore/tools.rb
albacore-2.8.0 ./lib/albacore/tools.rb
albacore-2.7.0 ./lib/albacore/tools.rb
albacore-2.6.8 ./lib/albacore/tools.rb
albacore-2.6.7 ./lib/albacore/tools.rb
albacore-2.6.6 ./lib/albacore/tools.rb
albacore-2.6.4 ./lib/albacore/tools.rb
albacore-2.6.3 ./lib/albacore/tools.rb
albacore-2.6.2 ./lib/albacore/tools.rb
albacore-2.6.1 ./lib/albacore/tools.rb
albacore-2.6.0 ./lib/albacore/tools.rb
albacore-2.5.14 ./lib/albacore/tools.rb
albacore-2.5.13 ./lib/albacore/tools.rb
albacore-2.5.11 ./lib/albacore/tools.rb