diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-05 22:09:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-05 22:09:28 +0000 |
commit | ab261ba95f775746985b4542c78c4492e405ffe5 (patch) | |
tree | 140fe23ea545705d63155ed96cad1ea72bec0305 /Master/texmf-dist | |
parent | 0116d6e6578382e9c6d1ba2f631f2deb4e5f8d9e (diff) |
arara (5mar20)
git-svn-id: svn://tug.org/texlive/trunk@54115 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/support/arara/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/arara/arara-manual.pdf | bin | 1827588 -> 1827955 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/support/arara/chapters/concepts.tex | 34 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/arara/chapters/logging.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/arara/arara.jar | bin | 15897061 -> 15897062 bytes | |||
-rw-r--r-- | Master/texmf-dist/scripts/arara/rules/asymptote.yaml | 2 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/arara/rules/biber.yaml | 2 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/arara/rules/knitr.yaml | 2 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/arara/rules/metapost.yaml | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/support/arara/build.gradle.kts | 6 |
10 files changed, 28 insertions, 28 deletions
diff --git a/Master/texmf-dist/doc/support/arara/README.md b/Master/texmf-dist/doc/support/arara/README.md index bc89923eed1..f892fb21240 100644 --- a/Master/texmf-dist/doc/support/arara/README.md +++ b/Master/texmf-dist/doc/support/arara/README.md @@ -10,7 +10,7 @@ way to enhance your TeX experience. The tool is an effort to provide a concise way to automate the daily TeX workflow for users and also package writers. Users might write their own rules when the provided ones do not suffice. -Current stable version: 5.0.0 +Current stable release: 5.0.1 > Please note that `arara` recently moved. We are proud to announce that > `arara` is now part of the [Island of TeX](https://gitlab.com/islandoftex). diff --git a/Master/texmf-dist/doc/support/arara/arara-manual.pdf b/Master/texmf-dist/doc/support/arara/arara-manual.pdf Binary files differindex e7e719e6afa..f95a2f02896 100644 --- a/Master/texmf-dist/doc/support/arara/arara-manual.pdf +++ b/Master/texmf-dist/doc/support/arara/arara-manual.pdf diff --git a/Master/texmf-dist/doc/support/arara/chapters/concepts.tex b/Master/texmf-dist/doc/support/arara/chapters/concepts.tex index acd96f0fe18..06122792291 100644 --- a/Master/texmf-dist/doc/support/arara/chapters/concepts.tex +++ b/Master/texmf-dist/doc/support/arara/chapters/concepts.tex @@ -96,12 +96,10 @@ command: "@{ return [ getCommand('ls'), getCommand('ls') ] }" As an example, please refer to the official \rbox{clean} rule for a real scenario where a list of commands is successfully employed: for each provided extension, the rule creates a new cleaning command and adds it to a list of removals to be processed later. -There are at least two variables available in the \abox{command} context and are described as follows (note that MVEL variables and orb tags are discussed in Chapter~\ref{chap:mvel}). A variable will be denoted by \varbox{variable} in this list. For each rule argument (defined later on), there will be a corresponding variable in the \abox{command} context, directly accessed through its unique identifier. +There are at least one variable available in the \abox{command} context and is described as follows (note that MVEL variables and orb tags are discussed in Chapter~\ref{chap:mvel}). A variable will be denoted by \varbox{variable} in this list. For each rule argument (defined later on), there will be a corresponding variable in the \abox{command} context, directly accessed through its unique identifier. \begin{description} -\item[\varbox{file}] This variable holds the file name, without any path reference, as a plain string. It is usually composed from the base name and the extension. This variable is available since the first release of \arara. - -\item[\varbox{reference}] This variable holds the canonical, absolute path representation of the \varbox{file} variable as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class. +\item[\varbox{reference}] This variable holds the canonical, absolute path representation of the file name as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class. \end{description} \begin{messagebox}{Quote handling}{araracolour}{\icinfo}{white} @@ -165,7 +163,7 @@ identifier: shell It is important to mention that not all names are valid as argument identifiers. \arara\ has restrictions on three names, described as follows, which cannot be used. \begin{messagebox}{Reserved names for rule arguments}{attentioncolour}{\icattention}{black} -Our tool has three names reserved for internal use: \abox{file}, \abox{files}, and \abox{reference}. Do not use them as argument identifiers! +Our tool has two names reserved for internal use: \abox{files}, and \abox{reference}. Do not use them as argument identifiers! \end{messagebox} \item[\describecontext{O}{arguments}{flag}] This key holds a plain string and is evaluated when the corresponding argument is defined in the directive context. After being evaluated, the result will be stored in a variable of the same name to be later accessed in the \abox{command} context. In the scenario where the argument is not defined in the directive, the variable will hold an empty string. @@ -178,14 +176,12 @@ flag: > } \end{codebox} -There are three variables available in the \abox{flag} context, described as follows. Note that are also several helper methods available in the rule context (for instance, \mtbox{isTrue} presented in the previous example) which provide interesting features for rule writing. They are detailed later on, in Chapter~\ref{chap:methods}, on page~\pageref{chap:methods}. +There are two variables available in the \abox{flag} context, described as follows. Note that are also several helper methods available in the rule context (for instance, \mtbox{isTrue} presented in the previous example) which provide interesting features for rule writing. They are detailed later on, in Chapter~\ref{chap:methods}, on page~\pageref{chap:methods}. \begin{description} \item[\varbox{parameters}] This variable holds a map of directive parameters available at runtime. For each argument identifier listed in the \abox{arguments} list in the rule context, there will be an entry in this variable. This is useful to get the actual values provided during execution and take proper actions. If a parameter is not set in the directive context, the reference will still exist in the map, but it will be mapped to an empty string. -\item[\varbox{file}] This variable holds the file name, without any path reference, as a plain string. It is usually composed from the base name and the extension. This variable is available since the first release of \arara. - -\item[\varbox{reference}] This variable holds the canonical, absolute path representation of the \varbox{file} variable as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class. +\item[\varbox{reference}] This variable holds the canonical, absolute path representation of the file name as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class. \end{description} In the previous example, observe that the MVEL expression defined in the \abox{flag} key checks if the user provided an affirmative value regarding shell escape, through comparing \varbox{parameters.shell} with a set of predefined affirmative values. In any case, the corresponding command flag is defined as result of such evaluation. @@ -201,9 +197,7 @@ There are three variables available in the \abox{default} context, described as \begin{description} \item[\varbox{parameters}] This variable holds a map of directive parameters available at runtime. For each argument identifier listed in the \abox{arguments} list in the rule context, there will be an entry in this variable. This is useful to get the actual values provided during execution and take proper actions. If a parameter is not set in the directive context, the reference will still exist in the map, but it will be mapped to an empty string. -\item[\varbox{file}] This variable holds the file name, without any path reference, as a plain string. It is usually composed from the base name and the extension. This variable is available since the first release of \arara. - -\item[\varbox{reference}] This variable holds the canonical, absolute path representation of the \varbox{file} variable as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class. +\item[\varbox{reference}] This variable holds the canonical, absolute path representation of the file name as a \rbox{File} object. This is useful if it's necessary to know the hierarchical structure of a project. Since the reference is a Java object, we can use all methods available in the \rbox{File} class. \end{description} \item[\describecontext{O}{arguments}{required}] There might be certain scenarios in which a rule could make use of required arguments (for instance, a copy operation in which source and target must be provided). The \abox{required} key acts as a boolean switch to indicate whether the corresponding argument should be mandatory. In this case, set the key value to \rbox{true} and the argument becomes required. Later on at runtime, \arara\ will throw an error if a required parameter is missing in the directive. @@ -337,7 +331,7 @@ Several methods are available in the directive context in order to ease the writ Although there are no conceptual guarantees for proper halting of unbounded loops, we have provided a technical solution for potentially infinite iterations: \arara\ has a predefined maximum number of loops. The default value is set to 10, but it can be overridden either in the configuration file or with a command line flag. We discuss this feature later on, in Sections~\ref{sec:options} and~\ref{sec:basicstructure}, on pages~\pageref{sec:options} and~\pageref{sec:basicstructure}, respectively. \end{messagebox} -All directives, regardless of their type, are internally mapped with both \abox{file} and \abox{reference} parameters, discussed earlier on, in Section~\ref{sec:coreconcepts}, on page~\pageref{sec:coreconcepts}, as special variables in the rule context. When inspecting the log file, you will find all map keys and values for each extracted directive (actually, there is an entire log section devoted to detailing directives found in the code). This feature is covered in Section~\ref{sec:directivenormalization}, on page~\pageref{sec:directivenormalization}. See, for instance, the report of the directive extraction and normalization process performed by \arara\ when inspecting \rbox{doc2.tex}, available in the log file. Note that timestamps were deliberately removed in order to declutter the output, and line breaks were included in order to easily spot the log entries. +All directives, regardless of their type, are internally mapped with the \abox{reference} parameter, discussed earlier on, in Section~\ref{sec:coreconcepts}, on page~\pageref{sec:coreconcepts}, as a special variable in the rule context. When inspecting the log file, you will find all map keys and values for each extracted directive (actually, there is an entire log section devoted to detailing directives found in the code). This feature is covered in Section~\ref{sec:directivenormalization}, on page~\pageref{sec:directivenormalization}. See, for instance, the report of the directive extraction and normalization process performed by \arara\ when inspecting \rbox{doc2.tex}, available in the log file. Note that timestamps were deliberately removed in order to declutter the output, and line breaks were included in order to easily spot the log entries. \begin{ncodebox}{Source file}{teal}{\icnote}{white}{doc2.tex} % arara: pdflatex @@ -351,15 +345,15 @@ Hello world. \begin{codebox}{An excerpt of the log file (directive section)}{teal}{\icnote}{white} Directive: { identifier: pdflatex, parameters: -{reference=/home/paulo/doc2.tex, file=doc2.tex}, +{reference=/home/paulo/doc2.tex}, conditional: { NONE }, lines: [1] } Directive: { identifier: pdflatex, parameters: -{shell=yes, file=doc2.tex, reference=/home/paulo/doc2.tex}, +{shell=yes, reference=/home/paulo/doc2.tex}, conditional: { NONE }, lines: [2] } \end{codebox} -The directive context also features another special parameter named \abox{files} which expects a non-empty list of file names as plain string values. For each element of this list, \arara\ will replicate the current directive and point the element being iterated as current \abox{file} and \abox{reference} values (being the latter resolved to a proper absolute, canonical path of the former). See, for instance, the report of the directive extraction and normalization process performed by \arara\ when inspecting \rbox{doc3.tex}, available in the log file. +The directive context also features another special parameter named \abox{files} which expects a non-empty list of file names as plain string values. For each element of this list, \arara\ will replicate the current directive and point the element being iterated as current \abox{reference} value (resolved to a proper absolute, canonical path of the file name). See, for instance, the report of the directive extraction and normalization process performed by \arara\ when inspecting \rbox{doc3.tex}, available in the log file. \begin{ncodebox}{Source file}{teal}{\icnote}{white}{doc3.tex} % arara: pdflatex: { files: [ doc1.tex, doc2.tex ] } @@ -369,11 +363,11 @@ Hello world. \begin{codebox}{An excerpt of the log file (directive section)}{teal}{\icnote}{white} Directive: { identifier: pdflatex, parameters: -{reference=/home/paulo/doc1.tex, file=doc1.tex}, +{reference=/home/paulo/doc1.tex}, conditional: { NONE }, lines: [1] } Directive: { identifier: pdflatex, parameters: -{reference=/home/paulo/doc2.tex, file=doc2.tex}, +{reference=/home/paulo/doc2.tex}, conditional: { NONE }, lines: [1] } \end{codebox} @@ -388,6 +382,10 @@ Even when a directive is interpreted with a file other than the one being proces If this is your first time using \arara\ or you do not have custom rules in the old format, you can safely ignore this section. All rules shipped with our tool are already written in the new format. \end{messagebox} +\begin{messagebox}{Removal of the file string reference}{araracolour}{\icattention}{white} +\arara\ previously had the file name string reference as the \abox{file} variable in the rule context. As of version 5.0, support for this variable has been dropped. Users should favour the \abox{reference} variable instead, since it holds the absolute, canonical representation of the file name as a proper \rbox{File} object. +\end{messagebox} + \begin{messagebox}{Removal of triggers}{araracolour}{\icattention}{white} \arara\ previously had the concept of triggers which allowed to easily trigger events like halting \arara. As of version 5.0, support for triggers has been dropped due to the lack of use cases. diff --git a/Master/texmf-dist/doc/support/arara/chapters/logging.tex b/Master/texmf-dist/doc/support/arara/chapters/logging.tex index 5309cee3189..de8979e02c6 100644 --- a/Master/texmf-dist/doc/support/arara/chapters/logging.tex +++ b/Master/texmf-dist/doc/support/arara/chapters/logging.tex @@ -86,10 +86,10 @@ After validation, all directives are listed in a special block in the log file, \begin{codebox}{Log file}{teal}{\icnote}{white} -------------------------- DIRECTIVES --------------------------- Directive: { identifier: pdftex, parameters: -{reference=/home/paulo/Documents/doc12.tex, -file=doc12.tex}, conditional: { NONE }, lines: [1] } +{reference=/home/paulo/Documents/doc12.tex}, +conditional: { NONE }, lines: [1] } Directive: { identifier: clean, parameters: {extensions=[log], -file=doc12.tex, reference=/home/paulo/Documents/doc12.tex}, +reference=/home/paulo/Documents/doc12.tex}, conditional: { NONE }, lines: [2] } ----------------------------------------------------------------- \end{codebox} diff --git a/Master/texmf-dist/scripts/arara/arara.jar b/Master/texmf-dist/scripts/arara/arara.jar Binary files differindex 9e2c046ad18..2a5f72715e2 100644 --- a/Master/texmf-dist/scripts/arara/arara.jar +++ b/Master/texmf-dist/scripts/arara/arara.jar diff --git a/Master/texmf-dist/scripts/arara/rules/asymptote.yaml b/Master/texmf-dist/scripts/arara/rules/asymptote.yaml index c58e7dd0e5e..7e56a0a7535 100644 --- a/Master/texmf-dist/scripts/arara/rules/asymptote.yaml +++ b/Master/texmf-dist/scripts/arara/rules/asymptote.yaml @@ -13,7 +13,7 @@ commands: command: > @{ return getCommand('asy', color, engine, twice, - format, output, options, file); + format, output, options, reference); } arguments: - identifier: color diff --git a/Master/texmf-dist/scripts/arara/rules/biber.yaml b/Master/texmf-dist/scripts/arara/rules/biber.yaml index 8cf9acb474d..5ca0498f15a 100644 --- a/Master/texmf-dist/scripts/arara/rules/biber.yaml +++ b/Master/texmf-dist/scripts/arara/rules/biber.yaml @@ -16,7 +16,7 @@ commands: return getCommand('biber', '--tool', options); } else { - return getCommand('biber', options, getBasename(file)); + return getCommand('biber', options, getBasename(reference)); } } arguments: diff --git a/Master/texmf-dist/scripts/arara/rules/knitr.yaml b/Master/texmf-dist/scripts/arara/rules/knitr.yaml index da17289db2d..feb6b1847c8 100644 --- a/Master/texmf-dist/scripts/arara/rules/knitr.yaml +++ b/Master/texmf-dist/scripts/arara/rules/knitr.yaml @@ -19,7 +19,7 @@ commands: elements.add('envir = ' + envir); elements.add('encoding = ' + encoding); return getCommand('Rscript', '-e', - 'library(knitr); knit("' + file + '", ' + + 'library(knitr); knit("' + reference + '", ' + 'output = ' + isEmpty(output, 'NULL', '"' + output + '"') + ', ' + String.join(', ', elements) + ')'); } diff --git a/Master/texmf-dist/scripts/arara/rules/metapost.yaml b/Master/texmf-dist/scripts/arara/rules/metapost.yaml index 390d08a1406..b72ff48b5c0 100644 --- a/Master/texmf-dist/scripts/arara/rules/metapost.yaml +++ b/Master/texmf-dist/scripts/arara/rules/metapost.yaml @@ -13,7 +13,7 @@ commands: command: > @{ return getCommand('mpost', interaction, numbersystem, - options, file); + options, reference); } arguments: - identifier: interaction diff --git a/Master/texmf-dist/source/support/arara/build.gradle.kts b/Master/texmf-dist/source/support/arara/build.gradle.kts index 3d5601227ca..4276ef7394f 100644 --- a/Master/texmf-dist/source/support/arara/build.gradle.kts +++ b/Master/texmf-dist/source/support/arara/build.gradle.kts @@ -244,8 +244,10 @@ publishing { name = "Job-Token" value = project.property("jobToken").toString() } else { - logger.warn("Will be unable to publish (jobToken missing)") - } + logger.warn("Will be unable to publish (jobToken missing)\n" + + "Ignore this warning if you are not running the publish task " + + "for the GitLab package repository.") + } } authentication { create<HttpHeaderAuthentication>("header") |