summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorJosep Puigdemont <josep.puigdemont@enea.com>2016-04-20 17:42:45 +0200
committerJosep Puigdemont <josep.puigdemont@enea.com>2016-04-20 18:59:04 +0200
commit26afb33eae322c85eda964d755a2ed0c05857a85 (patch)
tree1a596a99d42365c74c2b62b3547d2cd46535ad07 /ci
parent98b1206261c4901d436d8019701ae28e544c065e (diff)
build.sh: actually build the ISO.
Change-Id: Ica40e2fd78d6569cc17e6702a094889ae732249a Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/build.sh31
1 files changed, 28 insertions, 3 deletions
diff --git a/ci/build.sh b/ci/build.sh
index 334c72d7..256f8284 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -1,9 +1,34 @@
#!/bin/bash
+# Copyright (c) 2016 Enea Software AB
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
-if [ $# -gt 1 ]; then
- OUTPUT_DIR=shift
+error_exit() {
+ echo "$@" >&2
+ exit 1
+}
+
+if [ $# -eq 0 ]; then
+ OUTPUT_DIR=$(pwd)
else
- OUTPUT_DIR=""
+ OUTPUT_DIR=$(readlink -f $1)
+ shift
fi
+mkdir -p $OUTPUT_DIR || error_exit "Could not create directory $OUTPUT_DIR"
+
echo "Building armband, output dir: $OUTPUT_DIR"
+cd ..
+
+SCRIPT_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
+BUILD_BASE=$(readlink -e ${SCRIPT_DIR}/upstream/fuel/build/)
+RESULT_DIR="${BUILD_BASE}/release"
+
+make release || error_exit "Make release failed"
+
+echo "Copying results to $OUTPUT_DIR"
+sort ${BUILD_BASE}/gitinfo*.txt > ${OUTPUT_DIR}/gitinfo.txt
+cp ${RESULT_DIR}/*.iso ${OUTPUT_DIR}/
+cp ${RESULT_DIR}/*.iso.txt ${OUTPUT_DIR}/