-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.lua
80 lines (59 loc) · 2.33 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env texlua
--[[
Build script for scrlayer-fancyhdr project
Copyright (c) 2021–2025 Markus Kohm
This file is part of the build system of scrlayer-fancyhdr.
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 = "2025-02-10 v0.4"
-- Bundle and modules
module = "scrlayer-fancyhdr"
unpackfiles = { "scrlayer-fancyhdr.dtx" }
installfiles = { "scrlayer-fancyhdr.sty" }
-- Package
packtdszip = false
-- CTAN information
ctanpkg = "scrlayer-fancyhdr"
uploadconfig = {
pkg = "scrlayer-fancyhdr",
version = release_info,
author = "Markus Kohm",
license = "lppl1.3c",
summary = "combining fancyhdr with KOMA-Script's scrlayer",
topic = "page-hf",
ctanPath = "/macros/latex/contrib/scrlayer-fancyhdr",
bugtracker = "https://github.com/komascript/scrlayer-fancyhdr/issues",
home = "https://github.com/komascript/scrlayer-fancyhdr",
repository = "https://github.com/komascript/scrlayer-fancyhdr.git",
}
-- Typesetting
typesetruns = 5
-- Detail how to set the version automatically
-- Example: `l3build tag --date 2020-02-31 v0.3'
tagfiles = {"*.dtx","README.md","build.lua"}
function update_tag (file,content,tagname,tagdate)
tagname = string.gsub (tagname, "v(%d+%.%d+)", "%1")
if string.match (file, "%.dtx$") then
return string.gsub (content,
"%[%d%d%d%d%-%d%d%-%d%d v[%d%.]*%d+",
"[" .. tagdate .. " v" .. tagname )
elseif string.match (file, "%.md$") then
return string.gsub (content,
"\nRelease: %d%d%d%d%-%d%d%-%d%d v[%d%.]*%d+\n",
"\nRelease: " .. tagdate .. " v" .. tagname .. "\n" )
elseif string.match (file, "%.lua$") then
return string.gsub (content,
'\nrelease_info%s*=%s*"%d%d%d%d%-%d%d%-%d%d%s*v[%d%.]*%d+"%s*\n',
'\nrelease_info = "' .. tagdate .. " v" .. tagname .. '"\n')
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