From 3a2ed0b5b43fdb876371dceba9a07983b4899926 Mon Sep 17 00:00:00 2001 From: Marco Martins Date: Thu, 9 Nov 2023 21:40:03 +0100 Subject: [PATCH] Validate build --- buildWebsite.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/buildWebsite.nix b/buildWebsite.nix index 4c09bdf..33885b4 100644 --- a/buildWebsite.nix +++ b/buildWebsite.nix @@ -1,9 +1,17 @@ let pkgs = (import ./nix/shared.nix).pkgs; + buildValidate = pkgs.writeScriptBin "buildValidate" '' + if [ ! -f ./dist/elm.js ]; then + echo "Elm build not found" + exit 1 + fi + ''; + buildWebsite = pkgs.writeScriptBin "buildWebsite" '' ${pkgs.elmPackages.elm-pages}/bin/elm-pages build --debug ${pkgs.elmPackages.elm-pages}/bin/elm-pages build || true + ${buildValidate}/bin/buildValidate ''; in pkgs.mkShell {