Use local musiclink flake input with Go 1.24. Add matterbridge patch, routing docs, and deploy check script.
52 lines
1.1 KiB
Bash
Executable file
52 lines
1.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
HOST="${1:-ops-jrz1}"
|
|
|
|
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$repo_root"
|
|
|
|
echo "== Local working tree =="
|
|
git status -sb
|
|
|
|
echo
|
|
|
|
echo "== Commits ahead of origin/main =="
|
|
if git rev-parse --verify origin/main >/dev/null 2>&1; then
|
|
git log --oneline origin/main..HEAD || true
|
|
else
|
|
echo "origin/main not found (run: git fetch origin)"
|
|
fi
|
|
|
|
echo
|
|
|
|
echo "== Local HEAD =="
|
|
local_head="$(git rev-parse HEAD)"
|
|
echo "$local_head"
|
|
|
|
echo
|
|
|
|
echo "== Remote configuration revision ($HOST) =="
|
|
remote_rev="$(ssh "root@${HOST}" 'nixos-version --configuration-revision' || true)"
|
|
if [[ -z "$remote_rev" || "$remote_rev" == "" ]]; then
|
|
echo "(empty)"
|
|
else
|
|
echo "$remote_rev"
|
|
fi
|
|
|
|
echo
|
|
|
|
echo "== Comparison =="
|
|
if [[ -n "$remote_rev" && "$remote_rev" == "$local_head" ]]; then
|
|
echo "OK: remote matches local HEAD"
|
|
else
|
|
echo "NOTE: remote does not match local HEAD"
|
|
echo "Remote: ${remote_rev:-<empty>}"
|
|
echo "Local: $local_head"
|
|
fi
|
|
|
|
echo
|
|
|
|
echo "== Remote current system =="
|
|
ssh "root@${HOST}" 'readlink /run/current-system'
|