aboutsummaryrefslogtreecommitdiff
path: root/maintainers
diff options
context:
space:
mode:
authorRok Garbas <rok@garbas.si>2022-01-26 10:05:33 +0100
committerRok Garbas <rok@garbas.si>2022-01-26 10:05:33 +0100
commit50a9c48db4dddd6ba4c81dae74aa60f8ff10bfe5 (patch)
tree7b0dfb4299c185a9b2b33b0bd67dd7f3d9487d05 /maintainers
parent4fc3c4da7ba81a69c17063950933b45b39646949 (diff)
fail early
Diffstat (limited to 'maintainers')
-rwxr-xr-xmaintainers/push-docker.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/maintainers/push-docker.sh b/maintainers/push-docker.sh
index fe8fe174e..f9c5a6b18 100755
--- a/maintainers/push-docker.sh
+++ b/maintainers/push-docker.sh
@@ -17,6 +17,13 @@ DOCKER_MANIFEST_LATEST=""
for PLATFORM in $PLATFORMS;
do
+ if [ "$PLATFORM" = "x86_64-linux" ]; then DOCKER_PLATFORM="amd64"
+ elif [ "$PLATFORM" = "aarch64-linux" ]; then DOCKER_PLATFORM="arm64"
+ else
+ echo "EROROR: No docker platform found for $PLATFORM platform"
+ exit 1
+ fi
+
echo "=> Loading docker image for $PLATFORM platform ..."
DOCKER_IMAGE_TMP_FILE="$PWD/image-$PLATFORM.tar.gz"
@@ -25,13 +32,6 @@ do
fi
docker load -i $DOCKER_IMAGE_TMP_FILE
- if [ "$PLATFORM" = "x86_64-linux" ]; then DOCKER_PLATFORM="amd64"
- elif [ "$PLATFORM" = "aarch64-linux" ]; then DOCKER_PLATFORM="arm64"
- else
- echo "EROROR: No docker platform found for $PLATFORM platform"
- exit 1
- fi
-
echo "=> Tagging docker image of version $VERSION for $PLATFORM platform ..."
docker tag nix:$VERSION nixos/nix:$VERSION-$DOCKER_PLATFORM