aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorJosep Puigdemont <josep.puigdemont@enea.com>2016-04-21 13:40:25 +0200
committerJosep Puigdemont <josep.puigdemont@enea.com>2016-04-21 13:40:25 +0200
commit82c8ce04572c6b1e46909827ecb35ed2ca9e8285 (patch)
treeeed08841fbaf064d469a0ac8e1d11330a11817ca /ci
parentbe5864d1622dc080718422b313cf9954b123c3b0 (diff)
build.sh: save git URL and revision used for the build.
Change-Id: I7c812ec697b1d75aafe39f6ad542647c45cc70b6 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/build.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/ci/build.sh b/ci/build.sh
index 98078b0a..99de559a 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -10,6 +10,12 @@ error_exit() {
exit 1
}
+write_gitinfo() {
+ git_url=$(git config --get remote.origin.url)
+ git_rev=$(git rev-parse HEAD)
+ echo "$git_url: $git_rev"
+}
+
if [ $# -eq 0 ]; then
OUTPUT_DIR=$(pwd)
else
@@ -23,11 +29,13 @@ echo "Building armband, output dir: $OUTPUT_DIR"
cd ..
SCRIPT_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
-BUILD_BASE="${SCRIPT_DIR}/upstream/fuel/build/"
+BUILD_BASE="${SCRIPT_DIR}/upstream/fuel/build"
RESULT_DIR="${BUILD_BASE}/release"
make release || error_exit "Make release failed"
+write_gitinfo >> ${BUILD_BASE}/gitinfo.txt
+
echo "Copying results to $OUTPUT_DIR"
sort ${BUILD_BASE}/gitinfo*.txt > ${OUTPUT_DIR}/gitinfo.txt
cp ${RESULT_DIR}/*.iso ${OUTPUT_DIR}/