diff --git a/README.md b/README.md index c06ffe9..3478876 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,12 @@ $ # run: $ snack run -- ``` +Run the test suite with this command: + +``` bash +$ ./script/test +``` + ## Usage `niv` simplifies [adding](#add) and [updating](#update) dependencies in Nix diff --git a/README.tpl.md b/README.tpl.md index bb7b862..de1d7e4 100644 --- a/README.tpl.md +++ b/README.tpl.md @@ -22,6 +22,12 @@ $ # run: $ snack run -- ``` +Run the test suite with this command: + +``` bash +$ ./script/test +``` + ## Usage `niv` simplifies [adding](#add) and [updating](#update) dependencies in Nix diff --git a/nix/packages.nix b/nix/packages.nix index 6906e42..0439fbe 100644 --- a/nix/packages.nix +++ b/nix/packages.nix @@ -24,5 +24,15 @@ rec template ); readme-test = runCommand "README-test" {} - "diff ${../README.md} ${readme} && echo dummy > $out"; + '' + err() { + echo + echo -e "\e[31mERR\e[0m: README.md out of date" + echo -e "please run \e[1m./script/gen\e[0m" + echo + exit 1 + } + + diff ${../README.md} ${readme} && echo dummy > $out || err ; + ''; }