Progress reporting
This commit is contained in:
parent
32129d1794
commit
ef56d2e00d
|
@ -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 <pack clean>;
|
||||
exit -1 unless run <pack build>;
|
||||
|
@ -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 <pack clean test/test.ipkg>;
|
||||
exit -1 unless run <pack build test/test.ipkg>;
|
||||
}
|
||||
|
@ -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 <rsync -rvh --mkpath --delete>, "$dir/", "$remote:$web-base/$dest";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue