From 927db97913450ac478c7284ed188de4edb467a28 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 18 Dec 2025 17:11:22 +0100 Subject: scripts: Consolidate in `scripts` directory and advance --- check.sh | 19 ------------------- scripts/build.sh | 7 +++++++ scripts/check.sh | 20 ++++++++++++++++++++ scripts/test.sh | 12 ++++++++++++ update.sh | 3 +-- 5 files changed, 40 insertions(+), 21 deletions(-) delete mode 100755 check.sh create mode 100755 scripts/build.sh create mode 100755 scripts/check.sh create mode 100755 scripts/test.sh diff --git a/check.sh b/check.sh deleted file mode 100755 index f3c4ecb..0000000 --- a/check.sh +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env sh - -nix build \ - --option max-jobs 1 \ - --print-out-paths --no-link \ - .#checks.x86_64-linux.atuin-sync \ - .#checks.x86_64-linux.back \ - .#checks.x86_64-linux.deploy-activate \ - .#checks.x86_64-linux.deploy-schema \ - .#checks.x86_64-linux.dns \ - .#checks.x86_64-linux.formatting \ - .#checks.x86_64-linux.git-server \ - .#checks.x86_64-linux.rust-motd \ - .#checks.x86_64-linux.sharkey \ - .#checks.x86_64-linux.sharkey-cpu \ - .#checks.x86_64-linux.taskchampion-sync - # .#checks.x86_64-linux.email-dns \ - # .#checks.x86_64-linux.email-http \ - # .#checks.x86_64-linux.email-ip \ diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..a3ff064 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,7 @@ +#! /usr/bin/env sh + +for host in "server2" "server3"; do + nix build ".#nixosConfigurations.$host.config.system.build.toplevel" --print-out-paths --no-link --option max-jobs 1 +done + +# vim: ft=sh diff --git a/scripts/check.sh b/scripts/check.sh new file mode 100755 index 0000000..f152cbb --- /dev/null +++ b/scripts/check.sh @@ -0,0 +1,20 @@ +#! /usr/bin/env sh + +# --log-format multiline-with-logs \ +nix build \ + --option max-jobs 1 \ + --print-out-paths --no-link \ + .#checks.x86_64-linux.atuin-sync \ + .#checks.x86_64-linux.back \ + .#checks.x86_64-linux.deploy-activate \ + .#checks.x86_64-linux.deploy-schema \ + .#checks.x86_64-linux.dns \ + .#checks.x86_64-linux.formatting \ + .#checks.x86_64-linux.git-server \ + .#checks.x86_64-linux.rust-motd \ + .#checks.x86_64-linux.sharkey \ + .#checks.x86_64-linux.sharkey-cpu \ + .#checks.x86_64-linux.taskchampion-sync +# .#checks.x86_64-linux.email-dns \ +# .#checks.x86_64-linux.email-http \ +# .#checks.x86_64-linux.email-ip \ diff --git a/scripts/test.sh b/scripts/test.sh new file mode 100755 index 0000000..58c3343 --- /dev/null +++ b/scripts/test.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +test_target="$1" + +[ -z "$test_target" ] && { + echo "You need to select a test target!" 1>&2 + echo "Usage: test_interactive TEST_TARGET" 1>&2 + exit 1 +} + +nix build --log-format multiline-with-logs .#checks.x86_64-linux."$test_target" +# vim: ft=sh diff --git a/update.sh b/update.sh index 669ab7a..903b0ea 100755 --- a/update.sh +++ b/update.sh @@ -13,8 +13,7 @@ __update_sh_run() { __update_sh_run nix flake update __update_sh_run ./pkgs/update_pkgs.sh "$@" - for host in "server2" "server3"; do - nix build ".#nixosConfigurations.$host.config.system.build.toplevel" --print-out-paths --no-link --option max-jobs 1 + __update_sh_run nix build ".#nixosConfigurations.$host.config.system.build.toplevel" --print-out-paths --no-link --option max-jobs 1 done # vim: ft=sh -- cgit 1.4.1