diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-11-13 11:12:25 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-11-13 11:12:26 +0100 |
commit | 8a9cf7fc5c0ebfe1f9a32cd39aacd35cd9760c6a (patch) | |
tree | 55452baf105770dcc69a580faf01d40c1ad6ae1b /src/package/script.rs | |
parent | 3c0a0f37ccf838b59118407b18a11c071e31ff0b (diff) |
Remove indention in script phases
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>
Diffstat (limited to 'src/package/script.rs')
-rw-r--r-- | src/package/script.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/package/script.rs b/src/package/script.rs index a12e185..c8cde19 100644 --- a/src/package/script.rs +++ b/src/package/script.rs @@ -34,13 +34,14 @@ impl<'a> ScriptBuilder<'a> { for name in phaseorder { match package.phases().get(name) { Some(Phase::Text(text)) => { - script.push_str(&format!(r#" - ### phase {name} - {text} - ### / phase + script.push_str(&indoc::formatdoc!(r#" + ### phase {} + {} + ### / {} phase "#, - name = name.as_str(), - text = text, + name.as_str(), + text, + name.as_str(), )); script.push_str("\n"); |