Skip to content

Commit

Permalink
Validate build
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoDaniels committed Nov 14, 2023
1 parent 3214614 commit 3a2ed0b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions buildWebsite.nix
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 3a2ed0b

Please sign in to comment.