From ef56d2e00d76ff47c5948af12c72dd8167c3ccd6 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Sun, 22 Dec 2024 18:35:16 +0000 Subject: [PATCH] Progress reporting --- src/upload.raku | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/upload.raku b/src/upload.raku index c65efd3..a49f4b1 100755 --- a/src/upload.raku +++ b/src/upload.raku @@ -127,11 +127,13 @@ sub MAIN( my @test-files = paths("test/src", :file(-> $a {$a.ends-with(".idr") || $a.ends-with(".md")})) .map: *.IO.relative("test/src/".IO); + say "Collected {@idris-files.elems} source files and {@test-files.elems} test files"; # Clean if there is more than one ttc folder, easiest way to locate the # correct one my $ttc-path = "build/ttc".IO; if !($ttc-path ~~ :e) || $ttc-path.dir.elems != 1 { + say "Couldn't locate ttc path in $ttc-path, rebuilding"; # Do a pack clean build so we can find the ttms exit -1 unless run ; exit -1 unless run ; @@ -140,6 +142,7 @@ sub MAIN( # Now do the same for the test directory $ttc-path = "test/build/ttc".IO; if !($ttc-path ~~ :e) || $ttc-path.dir.elems != 1 { + say "Couldn't locate tests ttc path in $ttc-path, rebuilding tests"; exit -1 unless run ; exit -1 unless run ; } @@ -153,6 +156,7 @@ sub MAIN( # For each of our idris files, find the ttm, and generate the output in the # temporary directory my %index = %(); + say "Processing idris files"; for @idris-files.hyper :batch(1) -> $idr { my $out = render-idris-file $idr, $katla-config.IO; %index.&add-path($idr, $out.relative($dir)) when $out ~~ IO; @@ -160,6 +164,7 @@ sub MAIN( # Now repeat for the test directory my %test-index = %(); + say "Processing test files"; $build-path = "test/build/ttc/".IO.dir[0]; for @test-files.hyper :batch(1) -> $idr { my $out = render-idris-file $idr, $katla-config.IO, "test/src".IO; @@ -168,6 +173,7 @@ sub MAIN( my %final-index = ("src" => %index, "test" => ("src" => %test-index)); + say "Rendering index"; my $index = %final-index.&render-index(); my $title = $*CWD.basename; $index = html-en @@ -189,6 +195,8 @@ sub MAIN( "Projects/$snd/$fst" }; + say "Uploading files to $remote:$web-base/$dest"; + # Upload files run , "$dir/", "$remote:$web-base/$dest"; }