diff --git a/Changelog.md b/Changelog.md index 89e639f..33df7a0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,4 +1,4 @@ -## 0.37.0 2012-01-29 8c3ef1a +## 0.37.0 (2012-01-29) * put an entire line of output inside a single mutex so we don't cross the streams [David Dollar] * fix race condition with process termination [David Dollar] @@ -16,18 +16,18 @@ * Clean up fakefs usage in specs [brainopia] * runit creates a full path to export directory. [Fletcher Nichol] -## 0.36.1 2012-01-18 1485eeb +## 0.36.1 (2012-01-18) * 0.36.1 [David Dollar] * bump term-ansicolor in gemspec [David Dollar] -## 0.36.0 2012-01-17 a73dce5 +## 0.36.0 (2012-01-17) * 0.36.0 [David Dollar] * sync the writer stream [David Dollar] * capture stderr as well [David Dollar] -## 0.35.0 2012-01-16 2bfc065 +## 0.35.0 (2012-01-16) * update rake [David Dollar] * 0.35.0 [David Dollar] @@ -36,12 +36,12 @@ * Merge branch 'master' of https://github.com/michaeldwan/foreman into feature/concurrency [Matt Griffin] * default process concurrency is 0 when concurrency options specified, otherwise default concurrency is 1 [Michael Dwan] -## 0.34.1 2012-01-16 d4c2332 +## 0.34.1 (2012-01-16) * 0.34.1 [David Dollar] * fix missing start desc [David Dollar] -## 0.34.0 2012-01-16 a278755 +## 0.34.0 (2012-01-16) * 0.34.0 [David Dollar] * update man page [David Dollar] @@ -56,18 +56,18 @@ * add more colors [Gabriel Burt] * Added option to specify app_root, if executing a Procfile from a shared location [Nathan Broadbent] -## 0.33.1 2012-01-16 533139e +## 0.33.1 (2012-01-16) * 0.33.1 [David Dollar] * Merge pull request #129 from fnichol/resolve-home-template [David Dollar] * Expand template path under user's home directory. [Fletcher Nichol] -## 0.33.0 2012-01-15 cf269c3 +## 0.33.0 (2012-01-15) * 0.33.0 [David Dollar] * Revert "Merge pull request #125 from brainopia/master" [David Dollar] -## 0.32.0 2012-01-12 83748cb +## 0.32.0 (2012-01-12) * 0.32.0 [David Dollar] * Merge pull request #125 from brainopia/master [David Dollar] @@ -82,7 +82,7 @@ * Add "exec" action to allow execution of arbitrary commands with the app's environment. [Matt Griffin] * tweak readme [David Dollar] -## 0.31.0 2012-01-04 342d30b +## 0.31.0 (2012-01-04) * 0.31.0 [David Dollar] * make fork more robust [David Dollar] @@ -91,17 +91,17 @@ * Merge pull request #110 from lstoll/master [David Dollar] * Use different port ranges for each process type [Lincoln Stoll] -## 0.30.1 2011-12-23 fcfa913 +## 0.30.1 (2011-12-23) * 0.30.1 [David Dollar] * require thread for mutex [David Dollar] -## 0.30.0 2011-12-22 fc95936 +## 0.30.0 (2011-12-22) * 0.30.0 [David Dollar] * compatibility with ruby 1.8 [David Dollar] -## 0.29.0 2011-12-22 356c61f +## 0.29.0 (2011-12-22) * 0.29.0 [David Dollar] * 0.28.0.pre2 [David Dollar] @@ -114,7 +114,7 @@ * wip [David Dollar] * wip [David Dollar] -## 0.27.0 2011-12-05 914a1ee +## 0.27.0 (2011-12-05) * 0.27.0 [David Dollar] * add changelog [David Dollar] @@ -127,7 +127,7 @@ * disable email notifications [David Dollar] * add travis config [David Dollar] -## 0.26.1 2011-12-05 a5e0943 +## 0.26.1 2011-12-05 * Merge pull request #103 from csquared/load_env_from_irb [David Dollar] * refactor load_env to apply_environment [Chris Continanza] diff --git a/tasks/release.rake b/tasks/release.rake index a5e25fb..3c52666 100644 --- a/tasks/release.rake +++ b/tasks/release.rake @@ -34,11 +34,11 @@ task :authors do end def latest_release - latest = File.read("Changelog.md").split("\n").first.split(" ").last + latest = File.read("Changelog.md").split("\n").first.split(" ")[1] end def newer_release - tags = %x{ git tag --contains #{latest_release} }.split("\n").sort_by do |tag| + tags = %x{ git tag --contains v#{latest_release} }.split("\n").sort_by do |tag| Gem::Version.new(tag[1..-1]) end tags.reject { |tag| Gem::Version.new(tag[1..-1]).prerelease? }[1] @@ -47,12 +47,11 @@ end desc "Generate a Changelog" task :changelog do while release = newer_release - entry = %x{ git show --format="%h %cd" #{release} | head -n 1 } - commit, date_raw = entry.split(" ", 2) - date = Time.parse(date_raw).strftime("%Y-%m-%d") + entry = %x{ git show --format="%cd" #{release} | head -n 1 } + date = Time.parse(entry.chomp).strftime("%Y-%m-%d") - message = "## #{release[1..-1]} #{date} #{commit}\n\n" - message += %x{ git log --format="* %s [%an]" #{latest_release}..#{release} } + message = "## #{release[1..-1]} (#{date})\n\n" + message += %x{ git log --format="* %s [%an]" v#{latest_release}..#{release} } changelog = File.read("Changelog.md") changelog = message + "\n" + changelog