deploy: handle DIRTY state
This commit is contained in:
parent
14654384b1
commit
9159602ed2
6
deploy
6
deploy
@ -43,7 +43,11 @@ if [ "$1" = "status" ]; then
|
||||
host_data="$(${SSH} root@${host} 'nixos-version --json')"
|
||||
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))"
|
||||
rev_msg="DIRTY"
|
||||
if [ "$remote_rev" != "DIRTY" ]; then
|
||||
rev_msg=$(git log --format=%B -n1 $remote_rev | head -n1)
|
||||
fi
|
||||
echo -e "\t\t${remote_ver}\t${remote_rev}\t(${rev_msg})"
|
||||
done
|
||||
finish
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user