-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.lua
More file actions
155 lines (142 loc) · 5.85 KB
/
Copy pathbuild.lua
File metadata and controls
155 lines (142 loc) · 5.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#!/usr/bin/env texlua
packageversion="0.97a"
packagedate="2026-04-21"
local luatexstatus = status.list()
-- Build script for "LaTeX PDF management bundle" bundle
-- Identify the bundle and module
bundle = ""
module = "pdfmanagement"
typesetexe="lualatex"
installfiles = {"*.sty","*.cls","*.def","*.lua","*.ltx"}
if options["target"] == "ctan" then
sourcefiles = {"*.dtx","*.ins",
"firstaid/xcolor-patches-tmp-ltx.sty",
"firstaid/color-ltx.sty",
"firstaid/colorspace-patches-tmp-ltx.sty",
"lualinksplit.lua"
}
else
sourcefiles = {"*.dtx","*.ins",
"firstaid/xcolor-patches-tmp-ltx.sty",
"firstaid/color-ltx.sty",
"firstaid/colorspace-patches-tmp-ltx.sty",
"newpackages/new-bookmark.sty",
"newpackages/bkm-generic.def",
"newpackages/new-attachfile.sty",
"newpackages/atfi-generic.def",
"lualinksplit.lua"
}
end
checkruns = 4
recordstatus=true
usedev=true
specialformats = specialformats or {}
if usedev then
specialformats["latex"] = specialformats["latex"] or
{
luatex = {binary="luahbtex",format = "lualatex-dev"},
pdftex = {format = "pdflatex-dev"},
xetex = {format = "xelatex-dev"},
latexdvips = {binary="latex",format = "latex-dev"},
}
else
-- to try without dev-format
specialformats["latex"] = specialformats["latex"] or
{
luatex = {binary="luahbtex",format = "lualatex"},
pdftex = {format = "pdflatex"},
xetex = {format = "xelatex"},
latexdvips = {binary="latex",format = "latex"}
}
end
-- packtdszip = true
checkengines = {"pdftex","luatex","xetex"}
if os.type == "windows" then
checkconfigs = {"build", -- luatex, pdftex, xetex
"config-noxetex", --pdftex + luatex (std)
"config-luatex", -- luatex
-- "config-dvips", -- latex + dvips
"config-pdftex", -- pdftex
"config-xetex", -- xetex
"config-bookmark" -- temporarly!!!
}
else
-- exclude dvips tests if not on windows
checkconfigs = {"build", -- luatex, pdftex, xetex
"config-noxetex", --pdftex + luatex (std)
"config-luatex", -- luatex
-- "config-dvips", -- latex + dvips
"config-pdftex", -- pdftex
"config-xetex", -- xetex
"config-bookmark" -- temporarly!!!
}
-- exclude only record status works again
excludetests = {"show","catalog-remove"}
end
-- tagging
tagfiles = {
"*dtx",
"firstaid/*.sty",
"README.md",
"CHANGELOG.md",
"lualinksplit.lua"
}
function update_tag (file,content,tagname,tagdate)
tagdate = string.gsub (packagedate,"-", "/")
if string.match (file, "l3backend%-pdfmanagement.dtx" ) then
content = string.gsub (content,
"{%d%d%d%d%-%d%d%-%d%d}{%d%.%d+%a}",
"{".. packagedate .. "}{".. packageversion .."}")
content = string.gsub (content,
"date{Version %d%.%d+%a, released %d%d%d%d%-%d%d%-%d%d",
"date{Version "..packageversion..", released ".. packagedate)
content = string.gsub (content,
"Copyright %(C%) (%d%d%d%d)%-%d%d%d%d",
"Copyright (C) %1-"..os.date("%Y"))
return content
elseif string.match (file, "%.dtx$" ) then
content = string.gsub (content,
"\\ProvidesExplPackage{(.-)}{.-}{.-}",
"\\ProvidesExplPackage{%1}{" .. packagedate.."}{"..packageversion .. "}")
content = string.gsub (content,
"\\ProvidesExplFile{(.-)}{.-}{.-}",
"\\ProvidesExplFile{%1}{" .. packagedate.."}{"..packageversion .. "}")
content = string.gsub (content,
"\\ProvidesFile{(.-)}%[%d%d%d%d%-%d%d%-%d%d v%d%.%d+%a",
"\\ProvidesFile{%1}["..packagedate.." v"..packageversion)
content = string.gsub (content,
"date{Version %d%.%d+%a, released %d%d%d%d%-%d%d%-%d%d",
"date{Version "..packageversion..", released ".. packagedate)
content = string.gsub (content,
"Copyright %(C%) (%d%d%d%d)%-%d%d%d%d",
"Copyright (C) %1-"..os.date("%Y"))
return content
elseif string.match (file, "%.sty$" ) then
content = string.gsub (content,
"\\ProvidesPackage{(.-)}%[%d%d%d%d%-%d%d%-%d%d v%d%.%d+%a",
"\\ProvidesPackage{%1}["..packagedate.." v"..packageversion)
content = string.gsub (content,
"\\ProvidesExplPackage{(.-)}{.-}{.-}",
"\\ProvidesExplPackage{%1}{" .. packagedate.."}{"..packageversion .. "}")
return content
elseif string.match (file, "^README.md$") then
content = string.gsub (content,
"Version: %d%.%d+%a, %d%d%d%d%-%d%d%-%d%d",
"Version: " .. packageversion .. ", " .. packagedate )
content = string.gsub (content,
"(%d%d%d%d)%-%d%d%d%d",
"%1-"..os.date("%Y"))
return content
elseif string.match (file, "lualinksplit.lua") then
content = string.gsub (content,
"Version: %d%.%d+%a, %d%d%d%d%-%d%d%-%d%d",
"Version: " .. packageversion .. ", " .. packagedate )
return content
elseif string.match (file, "^CHANGELOG.md$") then
content = string.gsub (content,
"%[Unreleased%]",
"[".. packagedate.."]" )
return content
end
return content
end