[latex3-commits] [git/LaTeX3-latex3-l3build] silent-upload: allow empty announcement text (8a52c63)

David Carlisle d.p.carlisle at gmail.com
Fri Jan 24 09:39:09 CET 2020


Repository : https://github.com/latex3/l3build
On branch  : silent-upload
Link       : https://github.com/latex3/l3build/commit/8a52c63b21d45fd34abf1e836f24122378dded39

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

commit 8a52c63b21d45fd34abf1e836f24122378dded39
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Fri Jan 24 08:39:09 2020 +0000

    allow empty announcement text


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

8a52c63b21d45fd34abf1e836f24122378dded39
 CHANGELOG.md       | 3 +++
 l3build-upload.lua | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad35667..d016642 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.
 
 ## [Unreleased]
 
+- Allow announcement field to be empty
+  (with a warning this suppresses the CTAN announcement)
+
 ## [2020-01-14]
 
 ### Fixed
diff --git a/l3build-upload.lua b/l3build-upload.lua
index de1899a..257cce6 100644
--- a/l3build-upload.lua
+++ b/l3build-upload.lua
@@ -276,7 +276,11 @@ function ctan_single_field(fname,fvalue,max,desc,mandatory)
   if (fvalue==nil or type(fvalue)~="table") then
     local vs=trim_space(tostring(fvalue))
     if (mandatory==true and (fvalue == nil or vs=="")) then
-      error("The field " .. fname .. " must contain " .. desc)
+      if (fname=="announcement") then
+        print("Empty announcement: No ctan announcement will be made")
+      else
+        error("The field " .. fname .. " must contain " .. desc)
+      end
     end
     if (fvalue ~=nil and len(vs) > 0) then
       if (max > 0 and len(vs) > max) then





More information about the latex3-commits mailing list