2 # Copyright (c) 2016 Enea Software AB
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
14 git_url=$(git config --get remote.origin.url)
15 git_rev=$(git rev-parse HEAD)
16 echo "$git_url: $git_rev"
22 OUTPUT_DIR=$(readlink -f $1)
26 mkdir -p $OUTPUT_DIR || error_exit "Could not create directory $OUTPUT_DIR"
28 echo "Building armband, output dir: $OUTPUT_DIR"
31 SCRIPT_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
32 BUILD_BASE="${SCRIPT_DIR}/upstream/fuel/build"
33 RESULT_DIR="${BUILD_BASE}/release"
35 make REVSTATE="${OPNFV_ARTIFACT_VERSION}" release ||
36 error_exit "Make release failed"
38 write_gitinfo >> ${BUILD_BASE}/gitinfo_armband.txt
40 echo "Moving results to $OUTPUT_DIR"
41 sort ${BUILD_BASE}/gitinfo*.txt > ${OUTPUT_DIR}/gitinfo.txt
42 mv ${RESULT_DIR}/*.iso ${OUTPUT_DIR}/
43 mv ${RESULT_DIR}/*.iso.txt ${OUTPUT_DIR}/
45 # We need to build our own ODL plugin, and when this happens, fuel
46 # renames the iso to unofficial-opnfv-${REVSTATE}.iso, so here we remove
48 pushd ${OUTPUT_DIR} > /dev/null
49 rename 's/^unofficial-//' *.iso
50 rename 's/^unofficial-//' *.iso.txt