summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3build/l3build-upload.lua
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-05-06 03:00:58 +0000
committerNorbert Preining <norbert@preining.info>2021-05-06 03:00:58 +0000
commit25f20b6d8ccd4edcdfec23c1a3c908516076ee06 (patch)
treef889e071118d7d2db80066d14d14b020c50a2238 /macros/latex/contrib/l3build/l3build-upload.lua
parent75db33dc347ec9cfbaa2f3ec538a2697351f571b (diff)
CTAN sync 202105060300
Diffstat (limited to 'macros/latex/contrib/l3build/l3build-upload.lua')
-rw-r--r--macros/latex/contrib/l3build/l3build-upload.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/macros/latex/contrib/l3build/l3build-upload.lua b/macros/latex/contrib/l3build/l3build-upload.lua
index ba74309492..629d2ee7c7 100644
--- a/macros/latex/contrib/l3build/l3build-upload.lua
+++ b/macros/latex/contrib/l3build/l3build-upload.lua
@@ -1,6 +1,6 @@
--[[
-File l3build-upload.lua Copyright (C) 2018-2020 The LaTeX3 Project
+File l3build-upload.lua Copyright (C) 2018-2020 The LaTeX Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -78,6 +78,12 @@ end
-- if upload is anything else, the user will be prompted whether to upload.
-- For now, this is undocumented. I think I would prefer to keep it always set to ask for the time being.
+local ctan_post -- this is private to the module
+
+-- TODO: next is a public global method,
+-- but following functions are semantically local
+-- despite they are declared globally.
+
function upload(tagnames)
local uploadfile = ctanzip..".zip"
@@ -100,7 +106,7 @@ function upload(tagnames)
uploadconfig.note = uploadconfig.note or file_contents(uploadconfig.note_file)
- local tagnames = tagnames or { }
+ tagnames = tagnames or { }
uploadconfig.version = tagnames[1] or uploadconfig.version
local override_update_check = false
@@ -214,7 +220,7 @@ end
function shell(s)
local h = assert(popen(s, 'r'))
- t = assert(h:read('*a'))
+ local t = assert(h:read('*a'))
h:close()
return t
end
@@ -248,12 +254,6 @@ function construct_ctan_post(uploadfile,debug)
ctan_field("uploader", uploadconfig.uploader, 255, "Name of uploader", true, false )
ctan_field("version", uploadconfig.version, 32, "Package version", true, false )
- -- finish constructing the curl command:
- local qq = '"'
- if os_type == "windows" then
- qq = '\"'
- end
--- commandline ctan_post = ctan_post .. ' --form ' .. qq .. 'file=@' .. tostring(uploadfile) .. ';filename=' .. tostring(uploadfile) .. qq
ctan_post = ctan_post .. '\nform="file=@' .. tostring(uploadfile) .. ';filename=' .. tostring(uploadfile) .. '"'
return ctan_post
@@ -352,7 +352,7 @@ function file_contents (filename)
local f= open(filename,"r")
if f==nil then
return nil
- else
+ else
local s = f:read("*all")
close(f)
return s