-
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.
Ignore cache if Nextclade or dataset version is different
Currently checks Nextclade and dataset versions of the first row of the nextclade.tsv file and formats them as the propose JSON. Once the version JSON file is in place, it should be easy to swap out the check for the new file.
- Loading branch information
1 parent
055c5b7
commit 07559a1
Showing
3 changed files
with
66 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,16 @@ | ||
#!/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 -c ' | ||
split("\t") | ||
| { "nextclade_version": .[0], "nextclade_dataset_version": .[1] }') \ | ||
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