diff options
author | Karl Berry <karl@freefriends.org> | 2021-05-05 19:44:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-05-05 19:44:19 +0000 |
commit | 04c30db0018970c69516d748c7b4509240857b65 (patch) | |
tree | 60c80f16c8a85519e3e0af6981047bfc3fcd5d29 /Master/texmf-dist/scripts/l3build/l3build-upload.lua | |
parent | 4754ab4e3ed4d6763f26591c2c84be9dfcf54664 (diff) |
l3build (5may21)
git-svn-id: svn://tug.org/texlive/trunk@59091 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/l3build/l3build-upload.lua')
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-upload.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Master/texmf-dist/scripts/l3build/l3build-upload.lua b/Master/texmf-dist/scripts/l3build/l3build-upload.lua index ba743094924..629d2ee7c77 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-upload.lua +++ b/Master/texmf-dist/scripts/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 |