mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 04:46:43 +00:00
22 lines
664 B
Bash
Executable File
22 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"
|