2021-03-10 05:08:38 -08:00
|
|
|
#! /usr/bin/env nix-shell
|
|
|
|
#! nix-shell -i bash -p git
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
archive_hash () {
|
|
|
|
repo=$1
|
|
|
|
rev=$2
|
2021-09-08 08:01:10 -07:00
|
|
|
nix-prefetch-url --unpack "https://github.com/${repo}/archive/${rev}.tar.gz" 2> /dev/null
|
2021-03-10 05:08:38 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
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)"
|