From 7e3aa689427840372f899e8b9d9d3d5aa79ee6c2 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Fri, 20 Dec 2024 08:43:08 +0000 Subject: [PATCH] Don't rebuild if we don't need to --- src/upload.raku | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/upload.raku b/src/upload.raku index e7037a4..964e506 100755 --- a/src/upload.raku +++ b/src/upload.raku @@ -56,10 +56,13 @@ sub MAIN() { paths("src", :file(-> $a {$a.ends-with(".idr") || $a.ends-with(".md")})) .map: *.IO.relative("src/".IO); - - # Do a pack clean build so we can find the ttms - exit -1 unless run ; - exit -1 unless run ; + # Clean if there is more than one ttc folder, easiest way to locate the + # correct one + if "build/ttc".IO.dir.elems > 1 { + # Do a pack clean build so we can find the ttms + exit -1 unless run ; + exit -1 unless run ; + } # find our ttc folder $build-path = "build/ttc/".IO.dir[0];