krops: -> 1.26.2

Includes https://github.com/krebs/krops/commit/9fc8cbf8e826d4c8a118f37202ab3f335341082a

Add krops/fetch-release.sh
This commit is contained in:
Erik Arvstedt
2021-12-14 19:52:17 +01:00
parent 2aeee22251
commit 2069f62abc
3 changed files with 19 additions and 16 deletions
+17
View 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)"