mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
Merge pull request #169999 from kira-bruneau/treewide-git-updater
treewide: fix updateScripts for all packages using gitUpdater
This commit is contained in:
commit
9b26f76dee
@ -138,7 +138,7 @@ python3Packages.buildPythonApplication rec {
|
|||||||
passthru.updateScript = writeScript "update.sh" ''
|
passthru.updateScript = writeScript "update.sh" ''
|
||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#!nix-shell -i bash -p curl common-updater-scripts
|
#!nix-shell -i bash -p curl common-updater-scripts
|
||||||
version=$(list-git-tags https://gitlab.gnome.org/World/OpenPaperwork/paperwork.git | sed 's/^v//' | sort -V | tail -n1)
|
version=$(list-git-tags | sed 's/^v//' | sort -V | tail -n1)
|
||||||
update-source-version paperwork "$version" --file=pkgs/applications/office/paperwork/src.nix
|
update-source-version paperwork "$version" --file=pkgs/applications/office/paperwork/src.nix
|
||||||
docs_version="$(curl https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/raw/$version/paperwork-gtk/src/paperwork_gtk/model/help/screenshot.sh | grep TEST_DOCS_TAG= | cut -d'"' -f2)"
|
docs_version="$(curl https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/raw/$version/paperwork-gtk/src/paperwork_gtk/model/help/screenshot.sh | grep TEST_DOCS_TAG= | cut -d'"' -f2)"
|
||||||
update-source-version paperwork.sample_docs "$docs_version" --file=pkgs/applications/office/paperwork/src.nix --version-key=rev
|
update-source-version paperwork.sample_docs "$docs_version" --file=pkgs/applications/office/paperwork/src.nix --version-key=rev
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, common-updater-scripts
|
, gitUpdater
|
||||||
, genericUpdater
|
|
||||||
, writers
|
, writers
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, bash
|
, bash
|
||||||
@ -130,8 +129,7 @@ let
|
|||||||
inherit
|
inherit
|
||||||
pname
|
pname
|
||||||
version
|
version
|
||||||
common-updater-scripts
|
gitUpdater
|
||||||
genericUpdater
|
|
||||||
writers
|
writers
|
||||||
jq
|
jq
|
||||||
yq;
|
yq;
|
||||||
|
@ -2,19 +2,17 @@
|
|||||||
, version
|
, version
|
||||||
, homepage
|
, homepage
|
||||||
, lib
|
, lib
|
||||||
, common-updater-scripts
|
, gitUpdater
|
||||||
, genericUpdater
|
|
||||||
, writers
|
, writers
|
||||||
, jq
|
, jq
|
||||||
, yq
|
, yq
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
updater = genericUpdater {
|
updater = gitUpdater {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
attrPath = lib.toLower pname;
|
attrPath = lib.toLower pname;
|
||||||
rev-prefix = "v";
|
rev-prefix = "v";
|
||||||
versionLister = "${common-updater-scripts}/bin/list-git-tags --url=${homepage}";
|
|
||||||
};
|
};
|
||||||
updateScript = builtins.elemAt updater 0;
|
updateScript = builtins.elemAt updater 0;
|
||||||
updateArgs = map (lib.escapeShellArg) (builtins.tail updater);
|
updateArgs = map (lib.escapeShellArg) (builtins.tail updater);
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, stdenvNoCC
|
, stdenvNoCC
|
||||||
, bash
|
, bash
|
||||||
, common-updater-scripts
|
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, genericUpdater
|
, gitUpdater
|
||||||
, jq
|
, jq
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, mkYarnPackage
|
, mkYarnPackage
|
||||||
@ -80,8 +79,7 @@ stdenvNoCC.mkDerivation rec {
|
|||||||
inherit
|
inherit
|
||||||
pname
|
pname
|
||||||
version
|
version
|
||||||
common-updater-scripts
|
gitUpdater
|
||||||
genericUpdater
|
|
||||||
writers
|
writers
|
||||||
jq
|
jq
|
||||||
yarn
|
yarn
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
, version
|
, version
|
||||||
, homepage
|
, homepage
|
||||||
, lib
|
, lib
|
||||||
, common-updater-scripts
|
, gitUpdater
|
||||||
, genericUpdater
|
|
||||||
, writers
|
, writers
|
||||||
, jq
|
, jq
|
||||||
, yarn
|
, yarn
|
||||||
@ -11,15 +10,12 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
updater = genericUpdater {
|
updater = gitUpdater {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
attrPath = lib.toLower pname;
|
attrPath = lib.toLower pname;
|
||||||
|
|
||||||
# exclude prerelease versions
|
# exclude prerelease versions
|
||||||
versionLister = writers.writeBash "list-mirakurun-versions" ''
|
ignoredVersions = "-";
|
||||||
${common-updater-scripts}/bin/list-git-tags --url=${homepage} \
|
|
||||||
| grep '^[0-9]\+\.[0-9]\+\.[0-9]\+$'
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
updateScript = builtins.elemAt updater 0;
|
updateScript = builtins.elemAt updater 0;
|
||||||
updateArgs = map (lib.escapeShellArg) (builtins.tail updater);
|
updateArgs = map (lib.escapeShellArg) (builtins.tail updater);
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
, rev-prefix ? ""
|
, rev-prefix ? ""
|
||||||
, odd-unstable ? false
|
, odd-unstable ? false
|
||||||
, patchlevel-unstable ? false
|
, patchlevel-unstable ? false
|
||||||
# explicit url is useful when git protocol is used only for tags listing
|
# an explicit url is needed when src.meta.homepage or src.url don't
|
||||||
# while actual release is referred by tarball
|
# point to a git repo (eg. when using fetchurl, fetchzip, ...)
|
||||||
, url ? null
|
, url ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ done
|
|||||||
# By default we set url to src.url or src.meta.homepage
|
# By default we set url to src.url or src.meta.homepage
|
||||||
if [[ -z "$url" ]]; then
|
if [[ -z "$url" ]]; then
|
||||||
url="$(nix-instantiate $systemArg --eval -E \
|
url="$(nix-instantiate $systemArg --eval -E \
|
||||||
"with import ./. {}; $UPDATE_NIX_ATTR_PATH.src.url or $UPDATE_NIX_ATTR_PATH.src.meta.homepage" \
|
"with import ./. {}; $UPDATE_NIX_ATTR_PATH.src.meta.homepage or $UPDATE_NIX_ATTR_PATH.src.url" \
|
||||||
| tr -d '"')"
|
| tr -d '"')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ in rebar3Relx rec {
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
latest=$(list-git-tags --url=https://github.com/${owner}/${repo}.git | sort -V | tail -1)
|
latest=$(list-git-tags | sort -V | tail -1)
|
||||||
if [ "$latest" != "${version}" ]; then
|
if [ "$latest" != "${version}" ]; then
|
||||||
nixpkgs="$(git rev-parse --show-toplevel)"
|
nixpkgs="$(git rev-parse --show-toplevel)"
|
||||||
nix_path="$nixpkgs/pkgs/development/beam-modules/elvis-erlang"
|
nix_path="$nixpkgs/pkgs/development/beam-modules/elvis-erlang"
|
||||||
|
@ -51,7 +51,7 @@ rebar3Relx {
|
|||||||
#! nix-shell -i bash -p common-updater-scripts coreutils git gnused gnutar gzip "rebar3WithPlugins { globalPlugins = [ beamPackages.rebar3-nix ]; }"
|
#! nix-shell -i bash -p common-updater-scripts coreutils git gnused gnutar gzip "rebar3WithPlugins { globalPlugins = [ beamPackages.rebar3-nix ]; }"
|
||||||
|
|
||||||
set -ox errexit
|
set -ox errexit
|
||||||
latest=$(list-git-tags --url=https://github.com/${owner}/${repo}.git | sed -n '/[\d\.]\+/p' | sort -V | tail -1)
|
latest=$(list-git-tags | sed -n '/[\d\.]\+/p' | sort -V | tail -1)
|
||||||
if [[ "$latest" != "${version}" ]]; then
|
if [[ "$latest" != "${version}" ]]; then
|
||||||
nixpkgs="$(git rev-parse --show-toplevel)"
|
nixpkgs="$(git rev-parse --show-toplevel)"
|
||||||
nix_path="$nixpkgs/pkgs/development/beam-modules/erlang-ls"
|
nix_path="$nixpkgs/pkgs/development/beam-modules/erlang-ls"
|
||||||
|
@ -71,6 +71,7 @@ mkDerivation rec {
|
|||||||
|
|
||||||
passthru.updateScript = gitUpdater {
|
passthru.updateScript = gitUpdater {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
attrPath = "libsForQt5.mlt";
|
||||||
rev-prefix = "v";
|
rev-prefix = "v";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ let
|
|||||||
(rebar3WithPlugins { globalPlugins = [rebar3-nix]; })
|
(rebar3WithPlugins { globalPlugins = [rebar3-nix]; })
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
latest=$(list-git-tags --url=https://github.com/${owner}/${pname}.git | sed -n '/[\d\.]\+/p' | sort -V | tail -1)
|
latest=$(list-git-tags | sed -n '/[\d\.]\+/p' | sort -V | tail -1)
|
||||||
if [ "$latest" != "${version}" ]; then
|
if [ "$latest" != "${version}" ]; then
|
||||||
nixpkgs="$(git rev-parse --show-toplevel)"
|
nixpkgs="$(git rev-parse --show-toplevel)"
|
||||||
nix_path="$nixpkgs/pkgs/development/tools/build-managers/rebar3"
|
nix_path="$nixpkgs/pkgs/development/tools/build-managers/rebar3"
|
||||||
|
Loading…
Reference in New Issue
Block a user