[latex3-commits] [git/LaTeX3-latex3-l3build] ctan-post: first cut at l3build integration (5201a2b)

David Carlisle d.p.carlisle at gmail.com
Sat Jul 21 23:43:58 CEST 2018


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

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

commit 5201a2b1f6096b176f32476f80d507e9c7364185
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Sat Jul 21 22:43:58 2018 +0100

    first cut at l3build integration


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

5201a2b1f6096b176f32476f80d507e9c7364185
 build.lua             |    2 ++
 l3build-ctan-post.lua |   13 +++++++++++--
 l3build-stdmain.lua   |    4 ++++
 l3build.lua           |    1 +
 4 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/build.lua b/build.lua
index 7f1d2ce..796a786 100644
--- a/build.lua
+++ b/build.lua
@@ -48,6 +48,8 @@ function tag_hook(tagname)
   os.execute('git tag -a -m "" ' .. tagname)
 end
 
+require("z")
+
 if not release_date then
   dofile("./l3build.lua")
 end
\ No newline at end of file
diff --git a/l3build-ctan-post.lua b/l3build-ctan-post.lua
index 87ef264..0d4a195 100644
--- a/l3build-ctan-post.lua
+++ b/l3build-ctan-post.lua
@@ -49,15 +49,24 @@ for those people who are interested.
 -- the main interface is
 -- ctan_upload (c,upload)
 -- with a configuration table c and optional upload parameter
--- if upload is omitted or nil or false, onloy validation is attempted
+-- if upload is omitted or nil or false, only validation is attempted
 -- if upload is true the ctan upload URL will be used  after validation
--- if upload is anything else, the user will beprompted whether to upload.
+-- if upload is anything else, the user will be prompted whether to upload.
 
 local ctan_post_command = ctan_post_command or "curl"
 local curl_debug=false -- posting is disabled while testing
+local ctanconfig = ctanconfig or {}
+local ctanupload= ctanupload or "ask"
 
 function ctan_upload (c,upload)
 
+if type(c) ~= "table" then
+  print ("No ctan upload configuration found.")
+  return 1
+end
+
+print ("ZZZ" .. upload)
+
   c.cfg=ctan_post_command .. " "
 
 
diff --git a/l3build-stdmain.lua b/l3build-stdmain.lua
index 7dac27a..5f95920 100644
--- a/l3build-stdmain.lua
+++ b/l3build-stdmain.lua
@@ -64,6 +64,8 @@ function stdmain(target, names)
       errorlevel = bundleclean()
     elseif target == "ctan" then
       errorlevel = ctan()
+    elseif target == "ctanpost" then
+      errorlevel = ctan_upload(ctanconfig,ctanupload)
     elseif target == "install" then
       errorlevel = call(modules, "install")
     elseif target == "tag" then
@@ -101,6 +103,8 @@ function stdmain(target, names)
       errorlevel = clean()
     elseif target == "ctan" then
       errorlevel = ctan()
+    elseif target == "ctanpost" then
+      errorlevel = ctan_upload(ctanconfig,ctanupload)
     elseif target == "install" then
       errorlevel = install()
     elseif target == "manifest" then
diff --git a/l3build.lua b/l3build.lua
index 1ded83c..bc8f103 100755
--- a/l3build.lua
+++ b/l3build.lua
@@ -68,6 +68,7 @@ build_require("aux")
 build_require("clean")
 build_require("check")
 build_require("ctan")
+build_require("ctan-post")
 build_require("install")
 build_require("unpack")
 build_require("manifest")





More information about the latex3-commits mailing list