Pass flakeref to release script explicitly
This commit is contained in:
parent
e53fe6af29
commit
993a0da9e7
1 changed files with 7 additions and 8 deletions
15
release.sh
15
release.sh
|
@ -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
|
||||||
|
|
Reference in a new issue