mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 22:48:02 +03:00
rm pre-commit hook for docs & mv error catch to package
This commit is contained in:
parent
c8ce959207
commit
e4dedcde75
20
flake.nix
20
flake.nix
@ -299,17 +299,6 @@
|
||||
fi
|
||||
'');
|
||||
};
|
||||
build-docs = {
|
||||
enable = true;
|
||||
name = "build-docs";
|
||||
entry = l.toString (pkgs.writeScript "build-docs" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
errors=$(mdbook build docs/ 2>&1 | grep ERROR) # no better way?!
|
||||
if [ "$errors" ]; then
|
||||
exit 1
|
||||
fi
|
||||
'');
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -317,9 +306,14 @@
|
||||
docs =
|
||||
pkgs.runCommand
|
||||
"dream2nix-docs"
|
||||
{nativeBuildInputs = [pkgs.mdbook];}
|
||||
{nativeBuildInputs = [pkgs.bash pkgs.mdbook];}
|
||||
''
|
||||
mdbook build -d $out ${./.}/docs
|
||||
bash -c "
|
||||
errors=$(mdbook build -d $out ${./.}/docs |& grep ERROR)
|
||||
if [ \"$errors\" ]; then
|
||||
exit 1
|
||||
fi
|
||||
"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user