parent
2aeee22251
commit
2069f62abc
@ -3,8 +3,8 @@
|
||||
let
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://cgit.krebsco.de/krops";
|
||||
rev = "804c79a14dc8f81a602d31d5a1eed5f82b3f2457";
|
||||
sha256 = "1k20l7zqprsrm9s38xslr7190vssf4sjdprd9gh146hxlvln2qrf";
|
||||
rev = "1.26.2";
|
||||
sha256 = "0mzn213dh3pklvdzfpwi4nin4lncdap447zvl11j81r809jll76j";
|
||||
};
|
||||
in {
|
||||
lib = import "${src}/lib";
|
||||
|
17
pkgs/krops/fetch-release.sh
Executable file
17
pkgs/krops/fetch-release.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p git
|
||||
set -euo pipefail
|
||||
|
||||
archive_hash () {
|
||||
repo=$1
|
||||
rev=$2
|
||||
nix-prefetch-url --unpack "https://github.com/${repo}/archive/${rev}.tar.gz" 2> /dev/null
|
||||
}
|
||||
|
||||
echo "Fetching latest version"
|
||||
version=$(
|
||||
git ls-remote --tags https://github.com/krebs/krops | cut -f 2 \
|
||||
| sed -E 's|refs/tags/||g; s|((v)?(.*))|\1 \3|g' | sort -k 2 -V | tail -1 | cut -f 1 -d' '
|
||||
)
|
||||
echo "rev: ${version}"
|
||||
echo "sha256: $(archive_hash krebs/krops $version)"
|
@ -1,14 +0,0 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p git
|
||||
set -euo pipefail
|
||||
|
||||
archive_hash () {
|
||||
repo=$1
|
||||
rev=$2
|
||||
nix-prefetch-url --unpack "https://github.com/${repo}/archive/${rev}.tar.gz" 2> /dev/null
|
||||
}
|
||||
|
||||
echo "Fetching latest krops commit"
|
||||
latest=$(git ls-remote https://github.com/krebs/krops master | cut -f 1)
|
||||
echo "rev: ${latest}"
|
||||
echo "sha256: $(archive_hash krebs/krops $latest)"
|
Loading…
Reference in New Issue
Block a user