From ee6e523b6bf1187b66276d4b916cf01c2adc8479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Montero?= Date: Tue, 5 Sep 2023 00:37:36 -0600 Subject: [PATCH] abandons build in favor of format checker sadly source hut build machines are too weak --- .build.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.build.yml b/.build.yml index 0297938..f6c79c7 100644 --- a/.build.yml +++ b/.build.yml @@ -5,7 +5,15 @@ environment: NIX_CONFIG: "experimental-features = nix-command flakes" shell: true tasks: - - setup: | + - check format: | cd triviOS - - build: | - nix build ./triviOS\#nixosConfigurations.triviOS.config.system.build.toplevel --print-build-logs + nix fmt + git diff-index --quiet HEAD -- + diff=$? + + if [ "$diff" -eq 1 ]; then + echo "Invalid format." + exit 1 + else + echo "Done." + fi