From 8b27b805454dd20cbbfa9ed8cef810d8a6974fbb Mon Sep 17 00:00:00 2001 From: Giulio Moro Date: Wed, 8 Nov 2017 20:57:42 +0000 Subject: [PATCH] Automatically tagging motd with git tag and current date --- misc/rootfs/etc/motd | 4 ---- scripts/create_img.sh | 5 +++++ scripts/pre-chroot.sh | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/misc/rootfs/etc/motd b/misc/rootfs/etc/motd index 4067a15..381d280 100755 --- a/misc/rootfs/etc/motd +++ b/misc/rootfs/etc/motd @@ -16,7 +16,3 @@ The platform for ultra-low latency audio and sensor processing http://bela.io -Bela release image, v0.3.0, 1 November 2017 - -More info at https://github.com/BelaPlatform/bela-image/releases - diff --git a/scripts/create_img.sh b/scripts/create_img.sh index 5e71b0d..81569df 100755 --- a/scripts/create_img.sh +++ b/scripts/create_img.sh @@ -53,6 +53,11 @@ sync # copy rootfs sudo cp -a ${DIR}/rootfs/* /mnt/bela/root/ +# seal off the motd with current tag and commit hash +APPEND_TO_MOTD="sudo tee -a /mnt/bela/root/etc/motd" +printf "Bela image, `git -C ${DIR} describe --tags --dirty=++`, `date "+%e %B %Y"`\n\n" | ${APPEND_TO_MOTD} +printf "More info at https://github.com/BelaPlatform/bela-image-builder/releases\n\n" | ${APPEND_TO_MOTD} +printf "Built with bela-image-builder `git -C ${DIR} branch | grep '\*' | sed 's/\*\s//g'`@`git -C ${DIR} rev-parse HEAD`\non `date`\n\n" | ${APPEND_TO_MOTD} # create uEnv.txt for emmc cp ${DIR}/boot/uEnv.txt ${DIR}/boot/uEnv.tmp diff --git a/scripts/pre-chroot.sh b/scripts/pre-chroot.sh index 69a9846..e962dc7 100755 --- a/scripts/pre-chroot.sh +++ b/scripts/pre-chroot.sh @@ -35,5 +35,4 @@ echo "~~~~ installing xenomai ~~~~" sudo make -C ${DIR}/downloads/xenomai-3-build install DESTDIR=$targetdir --no-print-directory sudo cp -rv ${DIR}/misc/rootfs/* $targetdir/ -sudo printf "Built with bela-image-builder `git -C ${DIR} branch | grep '\*' | sed 's/\*\s//g'`@`git -C ${DIR} rev-parse HEAD`\non `date`\n\n" >> ${DIR}/rootfs/etc/motd