blob: df8cd3f8f85a4673e595a2c95145b92a83c12c71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 = "123"
BAR = "bla"
[phases]
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
if [[ "$BAR" != "bla" ]]; then
{{state "ERR" "BAR is not equal to 'bla'"}}
exit 1
fi
echo "Building {{name}} in version {{version}}"
'''
|