Pass flakeref to release script explicitly

This commit is contained in:
Pim Kunis 2024-04-27 00:16:47 +02:00
parent e53fe6af29
commit 993a0da9e7

View file

@ -3,19 +3,18 @@
set -euo pipefail
IFS=$'\n\t'
SYSTEM=x86_64-linux
flakeref="${1-}"
name="${2-}"
name="${1-}"
if [ -z "$name" ];
if [ -z "$flakeref" ] || [ -z "$name" ];
then
echo "Usage: $0 NAME"
echo "Usage: $0 FLAKEREF NAME"
exit 1
fi
imagename=$(nix eval --no-allow-dirty --raw .#packages.$SYSTEM.$name.imageName)
imagetag=$(nix eval --no-allow-dirty --raw .#packages.$SYSTEM.$name.imageTag)
image=$(nix build --no-allow-dirty .#packages.$SYSTEM.$name --print-out-paths --no-link)
imagename=$(nix eval --no-allow-dirty --raw $flakeref.imageName)
imagetag=$(nix eval --no-allow-dirty --raw $flakeref.imageTag)
image=$(nix build --no-allow-dirty $flakeref --print-out-paths --no-link)
gitrev=$(git rev-parse HEAD)
docker load < $image