[latex3-commits] [git/LaTeX3-latex3-l3build] master: ctan_file -> uploadfile (d99f93d)
Will Robertson
will at wspr.io
Tue Dec 18 13:45:20 CET 2018
Repository : https://github.com/latex3/l3build
On branch : master
Link : https://github.com/latex3/l3build/commit/d99f93d1e51a5fd6b8838c1c2a38a50183a1af5f
>---------------------------------------------------------------
commit d99f93d1e51a5fd6b8838c1c2a38a50183a1af5f
Author: Will Robertson <wspr81 at gmail.com>
Date: Sun Dec 16 21:52:09 2018 +1030
ctan_file -> uploadfile
>---------------------------------------------------------------
d99f93d1e51a5fd6b8838c1c2a38a50183a1af5f
build.lua | 2 +-
l3build-upload.lua | 9 ++++-----
l3build-variables.lua | 2 +-
l3build.dtx | 1 +
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/build.lua b/build.lua
index ae539ac..d480a7a 100644
--- a/build.lua
+++ b/build.lua
@@ -93,7 +93,7 @@ a note
just to myself
]]
-ctan_file="l3build.zip"
+uploadfile="l3build.zip"
ctanupload="ask"
diff --git a/l3build-upload.lua b/l3build-upload.lua
index 6a9cf5e..a2ee9ab 100644
--- a/l3build-upload.lua
+++ b/l3build-upload.lua
@@ -67,8 +67,6 @@ function upload()
end
uploaddata.pkg = uploaddata.pkg or ctanpkg or nil
- ctan_post = curlexe .. " "
-
-- field max desc mandatory multi
-- ----------------------------------------------------------------------------------------------------
ctan_field("announcement", uploaddata.announcement, 8192, "Announcement", false, false )
@@ -91,15 +89,16 @@ function upload()
ctan_field("version", uploaddata.version, 32, "Package version", true, false )
-- construct the curl command
- ctan_post = ctan_post .. " --form 'file=@" .. tostring(ctan_file) .. ";filename=" .. tostring(ctan_file) .. "'"
+ ctan_post = curlexe .. " "
+ ctan_post = ctan_post .. " --form 'file=@" .. tostring(uploadfile) .. ";filename=" .. tostring(uploadfile) .. "'"
ctan_post = ctan_post .. " https://ctan.org/submit/"
-- avoid lower level error from post command if zip file missing
- local zip=io.open(trim_space(tostring(ctan_file)),"r")
+ local zip=io.open(trim_space(tostring(uploadfile)),"r")
if zip~=nil then
io.close(zip)
else
- error("Missing zip file " .. tostring(ctan_file))
+ error("Missing zip file " .. tostring(uploadfile))
end
-- call post command to validate the upload at CTAN's validate URL
diff --git a/l3build-variables.lua b/l3build-variables.lua
index 1142c5f..4d35cb1 100644
--- a/l3build-variables.lua
+++ b/l3build-variables.lua
@@ -189,4 +189,4 @@ manifestfile = manifestfile or "MANIFEST.md"
-- Upload settings
curlexe = curlexe or "curl"
uploaddata = uploaddata or {}
-
+uploadfile = ctanzip..".zip"
diff --git a/l3build.dtx b/l3build.dtx
index d1cae71..904907b 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -152,6 +152,7 @@
\luavarset{recordstatus}{false} {Switch to include error level from test runs in \texttt{.tlg} files}
\luavarset{manifestfile} {"MANIFEST.md"} {Filename to use for the manifest file}
\luavarseparator
+\luavarset{uploadfile}{ctanpkg..".zip"}{Filename of the zipped package to upload}
\luavarset{uploaddata} {\meta{table}} {Metadata to describe the package for CTAN (see Table~\ref{tab:upload-setup})}
\luavarset{uploaddata.pkg}{ctanpkg}{Name of the CTAN package}
\luavarseparator
More information about the latex3-commits
mailing list