aboutsummaryrefslogtreecommitdiff
path: root/tools/cover.pl
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-11-28 09:59:36 -0500
committerSlack Coder <slackcoder@server.ky>2025-02-19 09:55:01 -0500
commit24493e32d8548110c514db9bc09efb5aba276ca5 (patch)
tree80319bacf6eb845741beb8d331969884495d6f4c /tools/cover.pl
parent82a520dcb6f6cfe538c68fd04a8a7b94f3b177c2 (diff)
downloadsbotools2-24493e32d8548110c514db9bc09efb5aba276ca5.tar.xz
Set To Do branch
Diffstat (limited to 'tools/cover.pl')
-rwxr-xr-xtools/cover.pl54
1 files changed, 0 insertions, 54 deletions
diff --git a/tools/cover.pl b/tools/cover.pl
deleted file mode 100755
index fcd813f..0000000
--- a/tools/cover.pl
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-use feature 'say';
-
-use AWS::S3;
-use Path::Tiny;
-
-if (!@ARGV) {
- die "Need to specify a build number to check coverage for.\n";
-}
-
-my $build = shift;
-my $base = qr!^[^/]+/sbotools/\Q$build\E/!;
-
-if (
- ! length($ENV{S3_ID}) or
- ! length($ENV{S3_KEY}) or
- ! length($ENV{S3_BUCKET})) {
- die "S3_ID and S3_KEY need to be defined in the environment.\n";
-}
-
-print "Connecting to S3...\n";
-
-my $s3 = AWS::S3->new(
- access_key_id => $ENV{S3_ID},
- secret_access_key => $ENV{S3_KEY},
-);
-
-my $bucket = $s3->bucket($ENV{S3_BUCKET});
-
-my $f_iter = $bucket->files(
- page_size => 100,
- page_number => 1,
- pattern => qr!$base\Q$build.11\E/!,
-);
-
-my $num = 0;
-while (my @files = $f_iter->next_page) {
- for my $file (@files) {
- $num++;
- print $file->key, "\n";
-
- my $local_fname = $file->key =~ s!$base!cover_db/!r;
- my $path = path($local_fname)->absolute();
-
- $path->touchpath->spew_raw(${ $file->contents() });
- }
-}
-
-if ($num == 0) {
- die "No files found for build number $build.\n";
-}