From 388b781acaeca4048a78f42c8f0589f2d3087640 Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Mon, 31 Jan 2022 17:18:12 +1300 Subject: [PATCH] Update scaffold tooling to give test command --- runtimes/.scaffold.nix | 3 +++ runtimes/scaffold.sh | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/runtimes/.scaffold.nix b/runtimes/.scaffold.nix index 51b68aa..de7bc8f 100644 --- a/runtimes/.scaffold.nix +++ b/runtimes/.scaffold.nix @@ -49,6 +49,9 @@ in piston.mkRuntime { # Specify a list of tests. # These should output "OK" to STDOUT if everything looks good + # + # Run the following command to test the package: + # $ ./piston test %NAME% tests = [ (piston.mkTest { files = { diff --git a/runtimes/scaffold.sh b/runtimes/scaffold.sh index fb3aafe..21858bc 100755 --- a/runtimes/scaffold.sh +++ b/runtimes/scaffold.sh @@ -28,10 +28,13 @@ else echo " \"$NAME\" = import ./$NAME.nix args;" >> default.nix sed -e 's/%LANGUAGE%/'"$LANGUAGE"'/g' \ -e 's/%RUNTIME%/'"$RUNTIME"'/g' \ + -e 's/%NAME%/'"$NAME"'/g' \ .scaffold.nix > $NAME.nix - git add $NAME.nix echo "}" >> default.nix + git add $NAME.nix default.nix + echo "Scaffolded $NAME" echo "Edit $NAME.nix to get started" + echo "Once you are done, run ./piston test $NAME to test it" fi \ No newline at end of file