deploy: archive after an update
This commit is contained in:
parent
81046c56a7
commit
b58e70e76c
20
bin/deploy
20
bin/deploy
@ -10,10 +10,8 @@ rebuild() {
|
|||||||
host="$(resolveAlias $1)"
|
host="$(resolveAlias $1)"
|
||||||
skip_check=$2
|
skip_check=$2
|
||||||
|
|
||||||
msg "Rebuilding: ${host}"
|
|
||||||
|
|
||||||
set -x
|
|
||||||
build_host=${BUILD_HOST:-$host}
|
build_host=${BUILD_HOST:-$host}
|
||||||
|
msg "Rebuilding: ${host} using ${build_host}"
|
||||||
nixos-rebuild ${TRACE} --flake .#${1} --build-host "root@${build_host}" --target-host "root@${host}" switch 2>&1 | nom
|
nixos-rebuild ${TRACE} --flake .#${1} --build-host "root@${build_host}" --target-host "root@${host}" switch 2>&1 | nom
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
@ -119,17 +117,17 @@ if [ "$1" = "update" ]; then
|
|||||||
done
|
done
|
||||||
|
|
||||||
# TODO: capture commit message and wrap it with what is being updated.
|
# TODO: capture commit message and wrap it with what is being updated.
|
||||||
if [ $can_sign = 1 ]; then
|
if [ $can_sign != 1 ]; then
|
||||||
if [ "$single" != "" ]; then
|
|
||||||
nix flake update --commit-lock-file "$single"
|
|
||||||
else
|
|
||||||
nix flake update --commit-lock-file
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
else
|
|
||||||
echo "Can't find signing key."
|
echo "Can't find signing key."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$single" != "" ]; then
|
||||||
|
nix flake update --commit-lock-file "$single"
|
||||||
|
else
|
||||||
|
nix flake update --commit-lock-file
|
||||||
|
fi
|
||||||
|
nix flake archive
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "installer" ]; then
|
if [ "$1" = "installer" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user