deploy: show commit message for deployed revisions
This commit is contained in:
parent
1044884c2d
commit
a015e218a6
@ -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
7
deploy
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user