base: prepare release 1.3.4
[luajson.git] / util / prepareNextRelease.lua
blob842c4bef0b220fdc4e313fcab932961bf85ed84e
1 #!/usr/bin/env lua
2 local io = require("io")
3 local from, tover = ...
4 if not from or not tover then
5 print("Format: prepareNextRelease.lua <from-tag> <tover-tag>")
6 return
7 end
9 local f = assert(io.open("docs/ReleaseNotes-" .. tover .. ".txt", "w"))
10 local headLine = "luajson v" .. tover .. " Release Notes"
11 f:write(headLine, "\n", ("="):rep(#headLine), "\n\n")
13 f:write([[
14 User Visible Changes
15 --------------------
17 Plans for next release
18 ----------------------
20 ]])
21 local tailLine = "Updates since " .. from
22 f:write(tailLine, "\n", ("="):rep(#tailLine), "\n\n")
24 local data = assert(io.popen("git shortlog " .. from .. "..HEAD | util/processShortlog.lua", "r"))
25 local tail = data:read("*a")
26 data:close()
28 f:write(tail)
29 f:close()