Skip to content

Commit

Permalink
Add man file to tag list
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Mar 8, 2018
1 parent a6a35b0 commit b53044e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions build.lua
Expand Up @@ -18,21 +18,26 @@ scriptmanfiles = {"l3build.1"}
sourcefiles = {"*.dtx", "l3build*.lua", "*.ins"}
typesetcmds = "\\AtBeginDocument{\\DisableImplementation}"
unpackdeps = { }
tagfiles = {"l3build.dtx", "*.md", "l3build.lua"}
tagfiles = {"l3build.1", "l3build.dtx", "*.md", "l3build.lua"}

-- Detail how to set the version automatically
function update_tag(file,content,tagname,tagdate)
if string.match(file, "%.dtx$") then
local iso = "%d%d%d%d%-%d%d%-%d%d"
if string.match(file, "%.1$") then
return string.gsub(content,
"\n%% \\date{Released %d%d%d%d%-%d%d%-%d%d}\n",
'%.TH l3build 1 "' .. iso .. '"\n',
'.TH l3build 1 "' .. tagname .. '"\n')
elseif string.match(file, "%.dtx$") then
return string.gsub(content,
"\n%% \\date{Released " .. iso .. "}\n",
"\n%% \\date{Released " .. tagname .. "}\n")
elseif string.match(file, "%.md$") then
return string.gsub(content,
"\nRelease %d%d%d%d%-%d%d%-%d%d\n",
"\nRelease " .. iso .. "\n",
"\nRelease " .. tagname .. "\n")
elseif string.match(file, "%.lua$") then
return string.gsub(content,
'\nrelease_date = "%d%d%d%d%-%d%d%-%d%d"\n',
'\nrelease_date = "' .. iso .. '"\n',
'\nrelease_date = "' .. tagname .. '"\n')
end
return contents
Expand Down

0 comments on commit b53044e

Please sign in to comment.