deploy: use single character for displaying host status
This commit is contained in:
parent
fd7e5e72c5
commit
9246ca5cca
6
deploy
6
deploy
@ -45,10 +45,14 @@ if [ "$1" = "status" ]; then
|
|||||||
remote_rev=$(echo $host_data | jq -r .configurationRevision)
|
remote_rev=$(echo $host_data | jq -r .configurationRevision)
|
||||||
remote_ver=$(echo $host_data | jq -r .nixosVersion)
|
remote_ver=$(echo $host_data | jq -r .nixosVersion)
|
||||||
rev_msg="DIRTY"
|
rev_msg="DIRTY"
|
||||||
|
rev_status="✓";
|
||||||
if [ "$remote_rev" != "DIRTY" ]; then
|
if [ "$remote_rev" != "DIRTY" ]; then
|
||||||
rev_msg=$(git log --format=%B -n1 $remote_rev | head -n1)
|
rev_msg=$(git log --format=%B -n1 $remote_rev | head -n1)
|
||||||
|
if [ "${remote_rev}" != "${rev}" ]; then
|
||||||
|
rev_status="×"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo -e "\t\t${remote_ver}\t${remote_rev}\t(${rev_msg})"
|
echo -e "\t\t${remote_ver}\t${rev_status}\t(${rev_msg})"
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user