-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use-nextclade-cache: Check cache's Nextclade version
- Loading branch information
1 parent
055c5b7
commit 4631f2a
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
s3_url="${1:?An S3 URL is required as the first argument}" | ||
|
||
|
||
trap '' SIGPIPE | ||
|
||
(aws s3 cp "${s3_url}" - \ | ||
| zstd -T0 -dcq \ | ||
| head -n 2 \ | ||
| tsv-select -H -f 'nextclade_version,dataset_version' \ | ||
| tail -n 1 \ | ||
| jq --raw-input --slurp ' | ||
split("\n") | ||
| map(split("\t")) | ||
| .[0:-1] | ||
| map( { "nextclade_version": .[0], "nextclade_dataset_version": .[1] } ) | ||
| .[0]') \ | ||
2> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters