@@ -17,7 +17,6 @@ build_base() {
1717 CONTAINER_PATH=" $( nix build " .#$container_flake_key " --no-link --json | jq ' .[0].outputs.out' -r) "
1818 echo " The image archive was created at: $CONTAINER_PATH "
1919 docker load -i $CONTAINER_PATH || exit 1
20- docker tag " $IMAGE_NAME_DEV :$IMAGE_TAG " " $IMAGE_NAME :$IMAGE_TAG " || exit 1
2120}
2221
2322case " $SUBCOMMAND " in
@@ -41,16 +40,15 @@ case "$SUBCOMMAND" in
4140
4241 build)
4342 build_base
44- runtime_set=all
4543 if [[ ! -z " $1 " ]]; then
44+ # $1 contains a variant to build
4645 runtime_set=$1
46+ docker build \
47+ --build-arg RUNTIMESET=$runtime_set \
48+ -f " $SCRIPT_DIR " /Dockerfile.withset \
49+ -t " $IMAGE_NAME_DEV :$runtime_set -latest" \
50+ .
4751 fi
48- # $1 contains a variant to build
49- docker build \
50- --build-arg RUNTIMESET=$runtime_set \
51- -f " $SCRIPT_DIR " /Dockerfile.withset \
52- -t " $IMAGE_NAME_DEV :$runtime_set -latest" \
53- .
5452 ;;
5553
5654 # dev commands
@@ -107,11 +105,11 @@ case "$SUBCOMMAND" in
107105 -e PISTON_FLAKE_PATH=/piston/src \
108106 -v " $SCRIPT_DIR " :/piston/src \
109107 --name piston_test_runner \
110- " $IMAGE_NAME_DEV :$IMAGE_TAG " \
108+ " $IMAGE_NAME :$IMAGE_TAG " \
111109 piston-test $1
112110 ;;
113111
114- test-with-cache )
112+ test-dev )
115113 docker run \
116114 --rm \
117115 -it \
@@ -147,6 +145,7 @@ case "$SUBCOMMAND" in
147145 echo " including the runtime set within it"
148146 echo " scaffold <language> [runtime] Initializes a new runtime"
149147 echo " test <runtime> Runs unit tests on the given runtime"
148+ echo " test-dev <runtime> Same as test, but using the development container and volume"
150149 echo " Optionally set runtime to --all to test all"
151150 echo " NOTE: This is only for the runtimes contained"
152151 echo " within this repo"
0 commit comments