mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
21 lines
664 B
Bash
Executable file
21 lines
664 B
Bash
Executable file
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p common-updater-scripts curl jq
|
|
|
|
set -eou pipefail
|
|
|
|
payload=$(jq -cn --rawfile query /dev/stdin '{"query": $query}' <<EOF | curl -s -H "Authorization: bearer $GITHUB_TOKEN" -d '@-' https://api.github.com/graphql
|
|
{
|
|
repository(owner: "yarnpkg", name: "berry") {
|
|
tag: refs(refPrefix: "refs/tags/@yarnpkg/cli/", first: 50, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) {
|
|
nodes {
|
|
name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
EOF
|
|
)
|
|
|
|
version=$(jq -r "[.data.repository.tag.nodes[].name | select(contains(\"-\")|not)] | max_by(split(\".\") | map(tonumber))" <<< "$payload")
|
|
|
|
update-source-version yarn-berry "$version"
|