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