summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-02-19 09:55:24 +0100
committerMatthias Beyer <matthias.beyer@atos.net>2021-03-10 11:10:21 +0100
commitae244f238682759eb64cc10040caa2cf68364210 (patch)
treeb924cc4791f0e1018dabccba90f6b0975de1a5bc /examples
parentbe0922cbb35adc6b6668221ffaef2b0de23ec3f0 (diff)
Example: Add patchcheck phase to check whether patches are present
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'examples')
-rw-r--r--examples/packages/repo/config.toml1
-rw-r--r--examples/packages/repo/pkg.toml12
2 files changed, 13 insertions, 0 deletions
diff --git a/examples/packages/repo/config.toml b/examples/packages/repo/config.toml
index 1f099ca..34fb996 100644
--- a/examples/packages/repo/config.toml
+++ b/examples/packages/repo/config.toml
@@ -26,6 +26,7 @@ database_name = "butido"
available_phases = [
"sourcecheck",
+ "patchcheck",
"depcheck",
"build"
]
diff --git a/examples/packages/repo/pkg.toml b/examples/packages/repo/pkg.toml
index a16c49c..cdd6a6c 100644
--- a/examples/packages/repo/pkg.toml
+++ b/examples/packages/repo/pkg.toml
@@ -20,6 +20,18 @@ sourcecheck.script = '''
}
'''
+patchcheck.script = '''
+ {{#if this.patches[0]}}
+ {{#each this.patches}}
+ if [[ ! -e "/patches/{{this}}" ]]; then
+ echo "Does not exist: /patches/{{this}}"
+ {{state "ERR" "Missing patch"}}
+ exit 1
+ fi
+ {{/each}}
+ {{/if}}
+'''
+
depcheck.script = '''
{{#each this.dependencies.runtime}}
# Try to find sha of dependency {{this}}