diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-09 11:47:28 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-09 17:46:35 +0100 |
commit | 09b9a8669348f9ab9743aaab0b010c9c0da63ba8 (patch) | |
tree | 5b794209f5e9897c3851310edfa8a593ae4e42f3 /examples/packages/1/repo/b/pkg.toml | |
parent | e0ab343878d20cc071b669865ca45f9ccbae1438 (diff) |
Add example package repository
This patch adds an example package repository including a "source
repository" where sources for packages are located.
The Makefile can be used to setup an testing environment, controlled via
environment settings (which are created via shell.nix for example) and
spin up a webserver for the sources.
Butido can then be used to download and build the sources into packages.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'examples/packages/1/repo/b/pkg.toml')
-rw-r--r-- | examples/packages/1/repo/b/pkg.toml | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/examples/packages/1/repo/b/pkg.toml b/examples/packages/1/repo/b/pkg.toml index 2ca66e2..df8cd3f 100644 --- a/examples/packages/1/repo/b/pkg.toml +++ b/examples/packages/1/repo/b/pkg.toml @@ -1,18 +1,41 @@ name = "b" version = "2" +[sources.src] +url = "http://localhost:8180/b-2.source" +hash.hash = "89cad6f574693c02c8ecf94983ec20ffad43af0b" + +[dependencies] +build = ["f =6"] +runtime = ["d =4", "e =5"] + [environment] -FOO = "bar" -BAZ = "bla" +FOO = "123" +BAR = "bla" [phases] -package.script = ''' - mkdir /outputs - echo "#BUTIDO:PHASE:package" - echo "#BUTIDO:PROGRESS:90" +build.script = ''' + echo "Look my pretty variables: $FOO" + if [[ -z "$FOO" ]]; then + {{state "ERR" "Failed to find variable FOO"}} + exit 1 + fi + + if [[ "$FOO" != "123" ]]; then + {{state "ERR" "FOO is not equal to '123'"}} + exit 1 + fi + + echo "Look my pretty variables: $BAR" + if [[ -z "$BAR" ]]; then + {{state "ERR" "Failed to find variable BAR"}} + exit 1 + fi - touch /outputs/b-2.pkg + if [[ "$BAR" != "bla" ]]; then + {{state "ERR" "BAR is not equal to 'bla'"}} + exit 1 + fi - echo "#BUTIDO:PROGRESS:100" - echo "#BUTIDO:STATE:OK:finished" + echo "Building {{name}} in version {{version}}" ''' |