[latex3-commits] [git/LaTeX3-latex3-l3build] ctan-post: upload tidy (e7b27f5)

Will Robertson wspr81 at gmail.com
Mon Dec 10 14:17:24 CET 2018


Repository : https://github.com/latex3/l3build
On branch  : ctan-post
Link       : https://github.com/latex3/l3build/commit/e7b27f5a743ef4a8a9a24fc0ab88a47769149efe

>---------------------------------------------------------------

commit e7b27f5a743ef4a8a9a24fc0ab88a47769149efe
Author: Will Robertson <wspr81 at gmail.com>
Date:   Mon Dec 10 23:47:24 2018 +1030

    upload tidy


>---------------------------------------------------------------

e7b27f5a743ef4a8a9a24fc0ab88a47769149efe
 l3build-upload.lua    |   16 +++++-----------
 l3build-variables.lua |    5 +++++
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/l3build-upload.lua b/l3build-upload.lua
index 6b76591..1fd9281 100644
--- a/l3build-upload.lua
+++ b/l3build-upload.lua
@@ -40,18 +40,14 @@ for those people who are interested.
 -- Currently string values are not checked, eg licence names, or URL syntax.
 
 -- The input form could be used to construct a post body but
--- luasec is not included in texlua.
-
--- Instead an external program is used to post.
+-- luasec is not included in texlua. Instead an external program is used to post.
 -- As Windows (since April 2018) includes curl now use curl.
--- a version using ctan-o-mat is available in the ctan-post github repo
+-- A version using ctan-o-mat is available in the ctan-post github repo.
 
 -- the main interface is
--- ctan_upload ()
--- with a configuration table c and optional upload parameter
-
+--     upload()
+-- with a configuration table `uploaddata`
 
-local ctan_post_command = ctan_post_command or "curl"
 
 local curl_debug = curl_debug or false -- to disable posting
 
@@ -60,8 +56,6 @@ local ctanupload = ctanupload or "ask"
 -- if ctanupload is true the ctan upload URL will be used after validation
 -- if upload is anything else, the user will be prompted whether to upload.
 
-uploaddata = uploaddata or {}
-
 function upload()
 
   -- try a sensible default for the package name:
@@ -71,7 +65,7 @@ function upload()
   end
   uploaddata.pkg = uploaddata.pkg or bundle or module or nil
 
-  ctan_post = ctan_post_command .. " "
+  ctan_post = uploadexe .. " "
 
   --         field                                   max  desc                               mandatory  multi
   --         -------------------------------------------------------------------------------------------------
diff --git a/l3build-variables.lua b/l3build-variables.lua
index b3b9997..9c8ad2b 100644
--- a/l3build-variables.lua
+++ b/l3build-variables.lua
@@ -185,3 +185,8 @@ tpfext = tpfext or ".tpf"
 
 -- Manifest options
 manifestfile = manifestfile or "MANIFEST.md"
+
+-- Upload settings
+uploadexe  = uploadexe  or "curl"
+uploaddata = uploaddata or {}
+





More information about the latex3-commits mailing list