Merge pull request #169999 from kira-bruneau/treewide-git-updater

treewide: fix updateScripts for all packages using gitUpdater
This commit is contained in:
José Romildo Malaquias 2022-04-26 09:18:53 -03:00 committed by GitHub
commit 9b26f76dee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 17 additions and 26 deletions

View file

@ -138,7 +138,7 @@ python3Packages.buildPythonApplication rec {
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!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
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

View file

@ -1,8 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, common-updater-scripts
, genericUpdater
, gitUpdater
, writers
, makeWrapper
, bash
@ -130,8 +129,7 @@ let
inherit
pname
version
common-updater-scripts
genericUpdater
gitUpdater
writers
jq
yq;

View file

@ -2,19 +2,17 @@
, version
, homepage
, lib
, common-updater-scripts
, genericUpdater
, gitUpdater
, writers
, jq
, yq
}:
let
updater = genericUpdater {
updater = gitUpdater {
inherit pname version;
attrPath = lib.toLower pname;
rev-prefix = "v";
versionLister = "${common-updater-scripts}/bin/list-git-tags --url=${homepage}";
};
updateScript = builtins.elemAt updater 0;
updateArgs = map (lib.escapeShellArg) (builtins.tail updater);

View file

@ -6,9 +6,8 @@
{ lib
, stdenvNoCC
, bash
, common-updater-scripts
, fetchFromGitHub
, genericUpdater
, gitUpdater
, jq
, makeWrapper
, mkYarnPackage
@ -80,8 +79,7 @@ stdenvNoCC.mkDerivation rec {
inherit
pname
version
common-updater-scripts
genericUpdater
gitUpdater
writers
jq
yarn

View file

@ -2,8 +2,7 @@
, version
, homepage
, lib
, common-updater-scripts
, genericUpdater
, gitUpdater
, writers
, jq
, yarn
@ -11,15 +10,12 @@
}:
let
updater = genericUpdater {
updater = gitUpdater {
inherit pname version;
attrPath = lib.toLower pname;
# exclude prerelease versions
versionLister = writers.writeBash "list-mirakurun-versions" ''
${common-updater-scripts}/bin/list-git-tags --url=${homepage} \
| grep '^[0-9]\+\.[0-9]\+\.[0-9]\+$'
'';
ignoredVersions = "-";
};
updateScript = builtins.elemAt updater 0;
updateArgs = map (lib.escapeShellArg) (builtins.tail updater);

View file

@ -10,8 +10,8 @@
, rev-prefix ? ""
, odd-unstable ? false
, patchlevel-unstable ? false
# explicit url is useful when git protocol is used only for tags listing
# while actual release is referred by tarball
# an explicit url is needed when src.meta.homepage or src.url don't
# point to a git repo (eg. when using fetchurl, fetchzip, ...)
, url ? null
}:

View file

@ -31,7 +31,7 @@ done
# By default we set url to src.url or src.meta.homepage
if [[ -z "$url" ]]; then
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 '"')"
fi

View file

@ -24,7 +24,7 @@ in rebar3Relx rec {
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
nixpkgs="$(git rev-parse --show-toplevel)"
nix_path="$nixpkgs/pkgs/development/beam-modules/elvis-erlang"

View file

@ -51,7 +51,7 @@ rebar3Relx {
#! nix-shell -i bash -p common-updater-scripts coreutils git gnused gnutar gzip "rebar3WithPlugins { globalPlugins = [ beamPackages.rebar3-nix ]; }"
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
nixpkgs="$(git rev-parse --show-toplevel)"
nix_path="$nixpkgs/pkgs/development/beam-modules/erlang-ls"

View file

@ -71,6 +71,7 @@ mkDerivation rec {
passthru.updateScript = gitUpdater {
inherit pname version;
attrPath = "libsForQt5.mlt";
rev-prefix = "v";
};

View file

@ -81,7 +81,7 @@ let
(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
nixpkgs="$(git rev-parse --show-toplevel)"
nix_path="$nixpkgs/pkgs/development/tools/build-managers/rebar3"