mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
d994dabace
We do not use a "plugin system" for Git addons anymore, and therefore this directory is no longer useful. Indeed that directory is way more confusing, given that it includes more than mere Git addons, going from Bitbucket server command-line tools to complete rewrites of Git in exotic programming languages. Also, without this directory, the mental load of decision-making reduces a lot. When anyone is interested in including a new git-related tool, just put it into pkgs/applications/version-management, without apologies.
20 lines
772 B
Bash
Executable File
20 lines
772 B
Bash
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p curl common-updater-scripts jq git
|
|
|
|
set -eu -o pipefail
|
|
|
|
oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion git" | tr -d '"')"
|
|
latestTag="$(git ls-remote --tags --sort="v:refname" https://github.com/git/git.git | grep -v '\{\}' | grep -v '\-rc' | tail -1 | sed 's|^.*/v\(.*\)|\1|')"
|
|
targetVersion="${1:-$latestTag}"
|
|
|
|
if [ ! "${oldVersion}" = "${targetVersion}" ]; then
|
|
update-source-version git "${targetVersion}"
|
|
nixpkgs="$(git rev-parse --show-toplevel)"
|
|
default_nix="$nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix"
|
|
nix-build -A git
|
|
git add "${default_nix}"
|
|
git commit -m "git: ${oldVersion} -> ${targetVersion}"
|
|
else
|
|
echo "git is already up-to-date"
|
|
fi
|