Merge pull request #275387 from DimitarNestorov/update-yarn-berry
yarn-berry: 4.0.1 -> 4.1.0
This commit is contained in:
commit
1d0ac1bde8
3 changed files with 31 additions and 3 deletions
|
@ -4800,6 +4800,11 @@
|
||||||
githubId = 32810399;
|
githubId = 32810399;
|
||||||
name = "Diffumist";
|
name = "Diffumist";
|
||||||
};
|
};
|
||||||
|
DimitarNestorov = {
|
||||||
|
name = "Dimitar Nestorov";
|
||||||
|
github = "DimitarNestorov";
|
||||||
|
githubId = 8790386;
|
||||||
|
};
|
||||||
diogotcorreia = {
|
diogotcorreia = {
|
||||||
name = "Diogo Correia";
|
name = "Diogo Correia";
|
||||||
email = "me@diogotc.com";
|
email = "me@diogotc.com";
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "yarn-berry";
|
name = "yarn-berry";
|
||||||
version = "4.0.1";
|
version = "4.1.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "yarnpkg";
|
owner = "yarnpkg";
|
||||||
repo = "berry";
|
repo = "berry";
|
||||||
rev = "@yarnpkg/cli/${version}";
|
rev = "@yarnpkg/cli/${version}";
|
||||||
hash = "sha256-9QNeXamNqRx+Bfg8nAhnImPuNFyqrHIs1eF9prSwIR4=";
|
hash = "sha256-SjWjvnq9sHdUhnZfzVC5BTQwksKcLqz8W+TTNXrIVjE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -33,11 +33,13 @@ stdenv.mkDerivation rec {
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.updateScript = ./update.sh;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://yarnpkg.com/";
|
homepage = "https://yarnpkg.com/";
|
||||||
description = "Fast, reliable, and secure dependency management.";
|
description = "Fast, reliable, and secure dependency management.";
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
maintainers = with maintainers; [ ryota-ka thehedgeh0g ];
|
maintainers = with maintainers; [ ryota-ka thehedgeh0g DimitarNestorov ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
mainProgram = "yarn";
|
mainProgram = "yarn";
|
||||||
};
|
};
|
||||||
|
|
21
pkgs/development/tools/yarn-berry/update.sh
Executable file
21
pkgs/development/tools/yarn-berry/update.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/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"
|
Loading…
Reference in a new issue