Skip to content

Commit a5d5abe

Browse files
committed
checksum: ES syntax update for newer version
1 parent 31898f7 commit a5d5abe

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

bin/checksum.pl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
not => {
3333
exists => {
3434
field => "checksum_md5"
35-
}
36-
}
37-
}
35+
},
36+
},
37+
},
38+
_source => [qw< id name download_url >],
3839
},
39-
fields => [qw< id name download_url >],
4040
);
4141

4242
log_warn { "Found " . $scroll->total . " releases" };
@@ -50,11 +50,11 @@
5050
last;
5151
}
5252

53-
log_info { "Adding checksums for " . $p->{fields}{name}[0] };
53+
log_info { "Adding checksums for " . $p->{_source}{name} };
5454

55-
if ( my $download_url = $p->{fields}{download_url} ) {
55+
if ( my $download_url = $p->{_source}{download_url} ) {
5656
my $file
57-
= cpan_dir . "/authors" . $p->{fields}{download_url}[0]
57+
= cpan_dir . "/authors" . $p->{_source}{download_url}
5858
=~ s/^.*authors//r;
5959
my $checksum_md5 = digest_file_hex( $file, 'MD5' );
6060
my $checksum_sha256 = digest_file_hex( $file, 'SHA-256' );
@@ -75,7 +75,7 @@
7575
}
7676
}
7777
else {
78-
log_info { $p->{fields}{name}[0] . " is missing a download_url" };
78+
log_info { $p->{_source}{name} . " is missing a download_url" };
7979
}
8080
}
8181

0 commit comments

Comments
 (0)