Fix windows release directory renaming.

Fixed bug caused by the use of `%` on replacement string when calling
`string.gsub` (lua >= 5.2). According to
[lua-users](http://lua-users.org/wiki/LuaFiveTwo):

> ### string.gsub repl
>
> string.gsub
> [[6](http://www.lua.org/manual/5.2/manual.html#pdf-string.gsub)] now
> raises an error if the replacement string contains a '%' followed by
> a character other than the permitted '%' or digit.

In short, the replacement string does not require escaping of *magic
characters*.
This commit is contained in:
Augusto Goulart
2020-03-28 17:41:03 +01:00
committed by Antonin Décimo
parent e734cc12f1
commit 8dbfb3ceca

View File

@@ -74,7 +74,7 @@ local function release(script, project, arch)
if stat then if stat then
ar:rename(i, stat.name:gsub( ar:rename(i, stat.name:gsub(
"^"..utils.lua.escape_string_regex(dir), "^"..utils.lua.escape_string_regex(dir),
utils.lua.escape_string_regex(project.title).."-win"..arch.."/")) project.title.."-win"..arch.."/"))
end end
end end