-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.lua
More file actions
94 lines (69 loc) · 2.85 KB
/
build.lua
File metadata and controls
94 lines (69 loc) · 2.85 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env texlua
--[[
Build script for the uni-titlepage project
Copyright (c) Markus Kohm, 2021–2026
This file is part of the build system of uni-titlepage.
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
license or (at your option) any later version. The latest version
of this license is in the file
https://www.latex-project.org/lppl.txt
]]
release_info = "2026-02-05 v1.5"
-- Bundle and modules
module = "uni-titlepage"
sourcefiles = { "uni-titlepage.dtx" }
unpackfiles = sourcefiles
installfiles = { "uni-titlepage.sty", "title-*.def" }
typesetfiles = { "titlepage-*.tex", "uni-titlepage.drv" }
docfiles = { "README.md" }
-- Documentation Generation
-- (currently we are using pdflatex-dev because of doc v3)
typesetexe = "pdflatex-dev"
typesetopts = "--interaction=batchmode"
-- Package
packtdszip = false
-- CTAN information
ctanpkg = "uni-titlepage"
uploadconfig = {
pkg = "uni-titlepage",
version = release_info,
author = "Markus Kohm",
license = "lppl1.3c",
summary = "extended universal titlepages (with several demo configurations)",
topic = "titlepage",
ctanPath = "/macros/latex/contrib/uni-titlepage",
bugtracker = "https://github.com/komascript/uni-titlepage/issues",
home = "https://github.com/komascript/uni-titlepage",
repository = "https://github.com/komascript/uni-titlepage.git",
}
-- Detail how to set the version automatically
-- Example: `l3build tag --date 2021/07/29 v0.5e'
tagfiles = {"*.dtx","README.md","build.lua"}
function update_tag (file,content,tagname,tagdate)
tagname = string.gsub (tagname, "v([%d%.]*%d+)", "%1")
tagyear = string.sub (tagdate,1,4)
if string.match (file, "%.dtx$") then
return string.gsub ( string.gsub (content,
"%d%d%d%d[%-–—/]%d%d[%-–—/]%d%d%s+v[%d%.]*%d+",
tagdate .. " v" .. tagname ),
"Copyright %([cC]%) Markus Kohm, 2009[^\n]*",
"Copyright (c) Markus Kohm, 2009–" .. tagyear )
elseif string.match (file, "%.md$") then
return string.gsub (content,
"%d%d%d%d[%-–—/]%d%d[%-–—/]%d%d v[%d%.]*%d+",
tagdate .. " v" .. tagname )
elseif string.match (file, "%.lua$") then
return string.gsub ( string.gsub (content,
'\nrelease_info *= *"%d%d%d%d[%-–—/]%d%d[%-–—/]%d%d v[%d%.]*%d+"\n',
'\nrelease_info = "' .. tagdate .. " v" .. tagname .. '"\n'),
'\n Copyright %([cC]%) Markus Kohm, 2021[^\n]*',
'\n Copyright (c) Markus Kohm, 2021–' .. tagyear )
end
return content
end
-- Find and run build system
kpse.set_program_name("kpsewhich")
if not release_date then
dofile(kpse.lookup("l3build.lua"))
end