summaryrefslogtreecommitdiff
path: root/doc/examples
diff options
context:
space:
mode:
authorPhil Dawson <phil.dawson@codethink.co.uk>2018-07-10 14:56:08 +0200
committerPhil Dawson <phildawson.0807@gmail.com>2018-07-30 07:58:07 +0000
commit8568d27248336555073a92b05958d097de14170c (patch)
treeed5bb8a795729b57b83898990c8f9a4fa0de2486 /doc/examples
parent92714b03307304253eb5250649f02c6ff2bdda5b (diff)
downloadbuildstream-8568d27248336555073a92b05958d097de14170c.tar.gz
examples: add project demonstrating a junction element
This is part of the work towards #437.
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/junctions/elements/callHello.bst9
-rw-r--r--doc/examples/junctions/elements/hello-junction.bst8
-rw-r--r--doc/examples/junctions/files/callHello.sh3
-rw-r--r--doc/examples/junctions/project.conf8
4 files changed, 28 insertions, 0 deletions
diff --git a/doc/examples/junctions/elements/callHello.bst b/doc/examples/junctions/elements/callHello.bst
new file mode 100644
index 000000000..4b0d583e8
--- /dev/null
+++ b/doc/examples/junctions/elements/callHello.bst
@@ -0,0 +1,9 @@
+kind: import
+
+sources:
+- kind: local
+ path: files/callHello.sh
+
+depends:
+ - filename: hello.bst
+ junction: hello-junction.bst
diff --git a/doc/examples/junctions/elements/hello-junction.bst b/doc/examples/junctions/elements/hello-junction.bst
new file mode 100644
index 000000000..dda865ecf
--- /dev/null
+++ b/doc/examples/junctions/elements/hello-junction.bst
@@ -0,0 +1,8 @@
+kind: junction
+
+# Specify the source of the BuildStream project
+# We are going to use the autotools examples distributed with BuildStream in the
+# doc/examples/autotools directory
+sources:
+- kind: local
+ path: ../autotools
diff --git a/doc/examples/junctions/files/callHello.sh b/doc/examples/junctions/files/callHello.sh
new file mode 100644
index 000000000..21bc424c9
--- /dev/null
+++ b/doc/examples/junctions/files/callHello.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo "Calling hello:"
+hello
diff --git a/doc/examples/junctions/project.conf b/doc/examples/junctions/project.conf
new file mode 100644
index 000000000..7f8ca6a38
--- /dev/null
+++ b/doc/examples/junctions/project.conf
@@ -0,0 +1,8 @@
+# Unique project name
+name: junctions
+
+# Required BuildStream format version
+format-version: 9
+
+# Subdirectory where elements are stored
+element-path: elements