-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.lua
More file actions
51 lines (44 loc) · 1.08 KB
/
build.lua
File metadata and controls
51 lines (44 loc) · 1.08 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
-- Build configuration for seatingchart
module = "seatingchart"
unpackfiles = {}
sourcefiles= {
"*.sty",
"*.sc",
"*.lua"
}
installfiles= {
"*.sty",
"*.sc",
"*.lua"
}
typesetexe = "lualatex"
typesetfiles = {
"seatingchart-doc-en.tex",
"seatingchart-doc-de.tex",
"seatingchart-example.tex"
}
typesetopts="-interaction=nonstopmode -shell-escape"
cleanfiles={
"*-doc-*-cnltx*",
"*.toc",
"*.aux"
}
tagfiles = {
"seatingchart.sty",
"seatingchart.lua",
"*.sc"
}
function update_tag(file,content,tagname,tagdate)
if not tagname then
local handle = io.popen("git describe --tags --abbrev=0")
tagname = handle:read("*a"):match("[^\n]+")
handle:close()
print("Set tagname to '"..tagname.."'")
end
if string.match(file,"%.*") or string.match(file,"*.sc") then
local update, count = string.gsub(content,"Date:\n([%%%s]+)%d%d%d%d%-%d%d%-%d%d","Date:\n%1"..tagdate)
update, count = string.gsub(update,"Version:\n([%%%s]+)v%d+%.%d+%.%d+","Version:\n%1"..tagname)
return update
end
return content
end