forked from matze/mtheme
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.lua
57 lines (49 loc) · 1.53 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env texlua
module = "moloch"
sourcefiledir = "src"
docfiledir = "doc"
typesetfiles = { "*.tex" }
textfiles = { "*.md", "LICENSE" }
checkengines = { "pdftex" }
checksuppfiles = { "*.tex" }
packtdszip = false
maxprintline = 9999
uploadconfig = {
pkg = "moloch",
version = "0.5.0", -- x-release-please-version
author = "Johan Larsson",
uploader = "Johan Larsson",
license = "cc-by-sa-4",
summary = "A clean and simple beamer theme",
description = "Moloch is a clean and simple beamer theme. "
.. "It is a fork of the Metropolis theme, but has a "
.. "more minimalistic and slightly less opinionated design.",
ctanPath = "/macros/latex/contrib/beamer-contrib/themes/moloch",
repository = "https://github.com/jolars/moloch",
bugtracker = "https://github.com/jolars/moloch/issues",
support = "https://github.com/jolars/moloch/discussions",
topic = "presentation",
announcement_file = "ctan_announcement.txt",
}
function update_tag(file, content, tagname, tagdate)
if string.match(file, "%.dtx$") then
local pattern = "\\ProvidesPackage{(.-)}%[([^%]]-) v([^%]]-) ([^%]]-)%]"
return content:gsub(
pattern,
function(package_name, old_date, old_version, description)
-- if tagdate is nil, use old_date
if tagname == nil then
tagname = old_version
end
return string.format(
"\\ProvidesPackage{%s}[%s v%s %s]",
package_name,
tagdate,
tagname,
description
)
end
)
end
return content
end