From db174b5c9ca033e2287468042e4798718a16dd4f Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 26 May 2022 16:03:50 -0700 Subject: [PATCH] add /BUILD with git commit and build date --- build_system.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build_system.sh b/build_system.sh index eeabe985..4235059a 100755 --- a/build_system.sh +++ b/build_system.sh @@ -65,6 +65,11 @@ sudo bash -c "echo \"127.0.0.1 $HOST\" >> etc/hosts" # Fix resolv config sudo bash -c "ln -sf /run/systemd/resolve/stub-resolv.conf etc/resolv.conf" +# Write build info +DATETIME=$(date '+%Y-%m-%dT%H:%M:%S') +GIT_HASH=$(git --git-dir=$DIR/.git rev-parse HEAD) +sudo bash -c "printf \"$GIT_HASH\n$DATETIME\" > BUILD" + cd $DIR # Unmount image