tasks/release.rake in alf-0.16.1 vs tasks/release.rake in alf-0.16.2

- old
+ new

@@ -2,19 +2,30 @@ desc "Bump the version number" task :bump, :to do |t, args| require 'path' raise "Missing version number" unless to = args[:to] - in_each_sub_module("bump to #{to}") do |sub| - noespec = Path("alf-#{sub}.noespec") + doit = ->(sub){ + # rewrite noespec + noespec = Path("alf#{sub}.noespec") content = noespec.read.gsub(/^ version:\n (.*?)\n/){|x| " version:\n #{to}\n" } noespec.write(content) system("noe go -s") + + # add a line to CHANGELOG.md + clog = Path('CHANGELOG.md') + clog.write("# #{to} - FIX ME\n\n* No change in this submodule.\n\n" + clog.read) + + # git commit now. system("git commit -a -m 'Bump version to #{to}'") + } + in_each_sub_module("bump to #{to}") do |sub| + doit.call("-"+sub) end + doit.call("") end desc "Set the CHANGELOG 'FIX ME' to the current date" task :stamp do require 'time' @@ -40,10 +51,11 @@ version = Alf::VERSION cmd = "git tag v#{version} && git push origin master --tags" in_each_sub_module("'git tag and push' in") do |sub| system(cmd) end + system(cmd) end desc "Create all gems, including in sub-modules" task :gem => :doc do cmd = "rm -rf pkg && rake gem" @@ -70,10 +82,10 @@ end system(cmd) end desc "Release it!" - task :go => [:tag, :gem, :push] + task :go => [:stamp, :tag, :gem, :push] end desc "Release alf" task :release => :"release:go" \ No newline at end of file