From d076c79cb9fd7401bdd48c41804b6444cfd56b14 Mon Sep 17 00:00:00 2001 From: Bryan Ramos Date: Mon, 13 May 2024 22:42:59 -0400 Subject: [PATCH] added clean recipe --- justfile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index b38f83f..45867d9 100644 --- a/justfile +++ b/justfile @@ -4,6 +4,21 @@ SYSTEM := "$(echo $HOSTNAME)" default: @just --list +# Clean up build artifacts +clean: + #!/usr/bin/env bash + set -euo pipefail + echo "Cleaning build artifacts" + if [ -d result ]; then + echo "Removing result directory..." + rm ./result; + fi + if ls *.qcow2 1> /dev/null 2>&1; then + echo "Removing virtual disk..." + rm ./*.qcow2; + fi + echo "All clean!" + # Output what derivations will be built test SYSTEM TYPE="nix": #!/usr/bin/env bash @@ -39,7 +54,7 @@ test SYSTEM TYPE="nix": esac # Build the nix expression and hydrate the results directory - pass VM flag to build a VM -build SYSTEM TYPE="nix": +make SYSTEM TYPE="nix": #!/usr/bin/env bash set -euo pipefail case "{{TYPE}}" in