-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.lua
38 lines (34 loc) · 871 Bytes
/
build.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env texlua
module = "lipsum"
pkgversion = "2.7"
pkgdate = os.date("%Y-%m-%d")
dofile("config-pdftex.lua")
checkconfigs =
{
"config-pdftex.lua"
, "config-tutex.lua"
}
-- Tagging:
tagfiles = { "lipsum.dtx", "CHANGELOG.md" }
function update_tag(file, content, tagname, tagdate)
if tagname == nil then
tagname = pkgversion
tagdate = pkgdate
end
local function tagstring(find, replace)
if string.match(content, find .. "\n") then
content = string.gsub(content, find .. "\n", replace .. "\n")
end
end
tagstring(
"\\def\\lipsumversion{%d+%.%d+%w?}",
"\\def\\lipsumversion{" .. tagname .. "}")
tagstring(
"\\def\\lipsumdate{%d+-%d+-%d+}",
"\\def\\lipsumdate{" .. tagdate .. "}")
tagstring(
"## %[Unreleased%]",
"## [" .. tagname .. "]")
return content
end
function check_engines() end