Skip to content

Commit

Permalink
add /BUILD with git commit and build date
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed May 26, 2022
1 parent 77d1a2f commit db174b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build_system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db174b5

Please sign in to comment.