[latex3-commits] [git/LaTeX3-latex3-l3build] master: Allow upload after validation warning, but show warning, issue #118 (4b818c4)
David Carlisle
d.p.carlisle at gmail.com
Mon May 4 13:45:12 CEST 2020
Repository : https://github.com/latex3/l3build
On branch : master
Link : https://github.com/latex3/l3build/commit/4b818c4779f4b3eaba7ee0725513ec1c76b9ade3
>---------------------------------------------------------------
commit 4b818c4779f4b3eaba7ee0725513ec1c76b9ade3
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Mon May 4 12:44:55 2020 +0100
Allow upload after validation warning, but show warning, issue #118
>---------------------------------------------------------------
4b818c4779f4b3eaba7ee0725513ec1c76b9ade3
l3build-upload.lua | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/l3build-upload.lua b/l3build-upload.lua
index fc25d5d..ba74309 100644
--- a/l3build-upload.lua
+++ b/l3build-upload.lua
@@ -163,14 +163,19 @@ end
fp_return = shell(ctan_post .. "validate")
end
end
- if match(fp_return,"WARNING") or match(fp_return,"ERROR") then
+ if (match(fp_return,"ERROR")) then
exit_status=1
end
-- if upload requested and validation succeeded repost to the upload URL
if (exit_status==0 or exit_status==nil) then
if (ctanupload ~=nil and ctanupload ~=false and ctanupload ~= true) then
- print("Validation successful, do you want to upload to CTAN? [y/n]" )
+ if (match(fp_return,"WARNING")) then
+ print("Warnings from CTAN package validation:" .. fp_return:gsub("%[","\n["):gsub("%]%]","]\n]"))
+ else
+ print("Validation successful." )
+ end
+ print("Do you want to upload to CTAN? [y/n]" )
local answer=""
io.stdout:write("> ")
io.stdout:flush()
@@ -189,7 +194,11 @@ end
exit_status=1
end
else
- print("CTAN validation successful")
+ if (match(fp_return,"WARNING")) then
+ print("Warnings from CTAN package validation:" .. fp_return:gsub("%[","\n["):gsub("%]%]","]\n]"))
+ else
+ print("CTAN validation successful")
+ end
end
else
error("Warnings from CTAN package validation:\n" .. fp_return)
More information about the latex3-commits
mailing list.