Skip to content

Commit

Permalink
Automatically tagging motd with git tag and current date
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliomoro committed Nov 8, 2017
1 parent cb89eb9 commit 8b27b80
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 0 additions & 4 deletions misc/rootfs/etc/motd
Original file line number Diff line number Diff line change
Expand Up @@ -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

5 changes: 5 additions & 0 deletions scripts/create_img.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion scripts/pre-chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8b27b80

Please sign in to comment.