[latex3-commits] [git/LaTeX3-latex3-l3build] master: New switch -F|--file for upload announcement (1696d25)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Dec 20 23:14:52 CET 2018
Repository : https://github.com/latex3/l3build
On branch : master
Link : https://github.com/latex3/l3build/commit/1696d252a41bddcf3dfc4294761989df398f6a8b
>---------------------------------------------------------------
commit 1696d252a41bddcf3dfc4294761989df398f6a8b
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Dec 20 22:14:52 2018 +0000
New switch -F|--file for upload announcement
>---------------------------------------------------------------
1696d252a41bddcf3dfc4294761989df398f6a8b
CHANGELOG.md | 2 +-
l3build-arguments.lua | 6 ++++++
l3build-upload.lua | 5 +++++
l3build.dtx | 1 +
4 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 01842a2..bd9af6c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,11 +10,11 @@ this project uses date-based 'snapshot' version identifiers.
### Added
- Switch `-m|--message` for providing upload announcement from command line
+- Switch `-F|--file` for providing upload announcement from file
### Changed
- Enable `--dry-run` option for `upload` target
-- Require (possibly empty) announcement text for uploads
### Fixed
diff --git a/l3build-arguments.lua b/l3build-arguments.lua
index 5b394f9..07f38a9 100644
--- a/l3build-arguments.lua
+++ b/l3build-arguments.lua
@@ -68,6 +68,12 @@ option_list =
desc = "Sets the epoch for tests and typesetting",
type = "string"
},
+ file =
+ {
+ desc = "Take the upload announcement from the given file",
+ short = "F",
+ type = "string"
+ },
first =
{
desc = "Name of first test to run",
diff --git a/l3build-upload.lua b/l3build-upload.lua
index aa07ffb..ec9dc2c 100644
--- a/l3build-upload.lua
+++ b/l3build-upload.lua
@@ -83,6 +83,11 @@ function upload()
uploadconfig.pkg = uploadconfig.pkg or ctanpkg or nil
-- Get data from command line if appropriate
+ if options["file"] then
+ local f = open(file)
+ uploadconfig.announcement = assert(f:read('*a'))
+ close(f)
+ end
uploadconfig.announcement = options["message"] or uploadconfig.announcement
-- start building the curl command:
diff --git a/l3build.dtx b/l3build.dtx
index 84afa64..0cdba78 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -337,6 +337,7 @@
% any files: simply lists those that would be installed
% \item |--engine| (|-e|) Sets the engine to use for testing
% \item |--epoch| Sets the epoch for typesetting and testing
+% \item |--file| (|-F|) Take the upload announcement from the given file
% \item |--first| Name of the first test to run
% \item |--force| (|-f|) Force checks to run even if sanity
% checks fail, \emph{e.g.}~when |--engine| is not given in
More information about the latex3-commits
mailing list