deploy: show commit message for deployed revisions

This commit is contained in:
Aaron Bieber 2022-08-28 09:17:55 -06:00
parent 40188f2c11
commit 9a87dd7532
No known key found for this signature in database
2 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,7 @@ AgentKeys="$(ssh-add -L | awk '{print $2}')"
RunHost="$(uname -n)" RunHost="$(uname -n)"
msg() { msg() {
echo "===> $@" echo -e "===> $@"
} }
resolveAlias() { resolveAlias() {

7
deploy
View File

@ -31,7 +31,8 @@ rebuild() {
if [ "$1" = "status" ]; then if [ "$1" = "status" ]; then
start start
msg "Currently at: $(git rev-parse HEAD)" rev=$(git rev-parse HEAD)
msg "Currently at: ${rev}\t($(git log --format=%B -n 1 $rev | head -n1))"
for h in $(ls hosts); do for h in $(ls hosts); do
host="$(resolveAlias $h)" host="$(resolveAlias $h)"
if ! tsAlive $host; then if ! tsAlive $host; then
@ -40,7 +41,9 @@ if [ "$1" = "status" ]; then
fi fi
echo -n "===> $h: " echo -n "===> $h: "
host_data="$(${SSH} root@${host} 'nixos-version --json')" host_data="$(${SSH} root@${host} 'nixos-version --json')"
echo -e "\t\t$(echo $host_data | jq -r .nixosVersion)\t$(echo $host_data | jq -r .configurationRevision)" remote_rev=$(echo $host_data | jq -r .configurationRevision)
remote_ver=$(echo $host_data | jq -r .nixosVersion)
echo -e "\t\t${remote_ver}\t${remote_rev}\t($(git log --format=%B -n 1 $remote_rev | head -n1))"
done done
finish finish
exit 0 exit 0