Skip to content

Commit a632078

Browse files
committed
maint: self-configure rockspec for release versions.
* stdlib-git-1.rockspec (source, dependencies): Set contents based on _MODREV value. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
1 parent 15ac209 commit a632078

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

‎stdlib-git-1.rockspec‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,29 @@ description = {
1313
license = 'MIT/X11',
1414
}
1515

16-
source = {
17-
url = 'git://github.com/lua-stdlib/lua-stdlib.git',
18-
--url = 'http://github.com/lua-stdlib/lua-stdlib/archive/v' .. _MODREV .. '.zip',
19-
--dir = 'lua-stdlib-' .. _MODREV,
20-
}
16+
source = (function(gitp)
17+
if gitp then
18+
return {
19+
url = 'git://github.com/lua-stdlib/lua-stdlib.git',
20+
}
21+
else
22+
return {
23+
url = 'http://github.com/lua-stdlib/lua-stdlib/archive/v' .. _MODREV .. '.zip',
24+
dir = 'lua-stdlib-' .. _MODREV,
25+
}
26+
end
27+
end)(_MODREV == 'git')
2128

2229
dependencies = {
2330
'lua >= 5.1, < 5.4',
24-
'ldoc',
2531
'std._debug',
2632
'std.normalize >= 2.0',
2733
}
2834

35+
if _MODREV == 'git' then
36+
dependencies[#dependencies + 1] = 'ldoc'
37+
end
38+
2939
build = {
3040
type = 'builtin',
3141
modules = {

0 commit comments

Comments
 (0)