Age | Commit message (Collapse) | Author |
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
and cannot be used with non-Vec-based slices
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
We actually need to make an ugly (and very bad performing) hack here, to
get the `unindent` crate to actually unindent here.
text = format!("\n{}", text).unindent(),
the format!() call is necessary to tell `unindent::Unindent::unindent()`
that the intended indentation is actually zero.
If we do not add that `\n` here, the first line of the to-be-unindented
indented text stays unintentionally indented.
For example, unindenting the intentionally indented string:
" intentionally indented
intentionally indented
"
results unintentionally in the partially indented and partially
unindented text:
" intentionally indented
intentionally indented
"
Which is not our intention of course, although it seems to be the
intention of the unindent crate, as documented.
But with the intentionally added `\n` we unindent the indentation of all
indented "intentionally indented" lines.
Signed-off-by: Christoph Prokop <christoph.prokop@atos.net>
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Tested-by: Christoph Prokop <christoph.prokop@atos.net>
Tested-by: Matthias Beyer <matthias.beyer@atos.net>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This adds two script helpers to join lists of strings.
They do not support arrays.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This is the right scope anyways.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch adds script linting via a configurable script.
With this patch, the configuration can point to a script or program that
gets the packaging script on STDIN and might exit with a nonzero value
on error.
The simplest script I can think of that adds value is:
#!/bin/bash
shellcheck -
to run the packaging script through shellcheck.
stdout and stderr of the linting script are printed in case of non-zero
return value.
Linting can be disabled by not setting the script in the config or by
passing a commandline flag to skip linting (a warning will be printed in
this case).
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Fixes: 1d038bae2b ("Remove feature: State message in "OK" case.")
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
The "OK" case had a state message parameter. This was removed because
"OK" does mean that everything went well. No need to have a message
here.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch moves the script formatting to the definition of the Script
type, where it belongs to.
This is not an optimal implementation code-cleanness wise, because we
could always improve the interface to be even more typesafe and
convenient to use, but I guess this is nice for now.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch adds script helpers, so that we do not have to write out
echo "#BUTIDO:STATE:OK:succeeded"
but can write
{{state "OK"}}
for example.
Three helpers were added, for progress, state and phase.
These can be only used in bash scripts for now.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch implements the shebang overwriting functionality that was in
a TODO note.
It adds a `Shebang` type for it, which is a String wrapper.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch adds strict script interpolation, which means that the script
interpolation will result in an error if a variable is referenced that
does not exist.
Before this patch, referencing an absent variable did result in an empty
string, possibly resulting in an error at runtime.
This feature is on by default.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Fixes: 788c81a4 ("Add ability to use variables from the package in its build script using handlebars syntax")
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
handlebars syntax
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
This patch removes the indention when building the script.
It also adds the phase name to the "phase-end-comment" line.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Because we want to write the whole Tree object into the database as
JSON, we need to be able to serialize all these types.
Some of them (which had no implementation of Deserialize) also got an
implementation of Deserialize, because we also want to be able to read
them from the database and print them to the user.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
(cherry picked from commit 3170c9ed14e22c5baa41618326a4db02389da445)
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|