2023-03-16 11:24:23 +00:00
#!/usr/bin/env bash
2023-03-16 11:53:12 +00:00
set -euxo pipefail
2023-05-04 09:00:37 +00:00
2023-05-04 12:59:44 +00:00
nix run .#build-static
nix run .#build-container
2023-05-04 09:00:37 +00:00
2023-05-23 08:18:41 +00:00
if [[ ! -z $TAG ]]; then
2023-05-04 12:59:44 +00:00
# Configure Docker Auth
2023-05-04 13:40:24 +00:00
mkdir .docker
cat > .docker/config.json <<EOF
2023-05-04 12:59:44 +00:00
{"auths":{"https://index.docker.io/v1/":{"auth":"${DOCKER_AUTH}"}}}
EOF
2023-05-04 13:40:24 +00:00
export DOCKER_CONFIG=`pwd`/.docker/
2023-03-16 11:53:12 +00:00
2023-05-04 13:29:41 +00:00
# Hack to circumvent "initializing source docker-archive:docker/linux.386.tar.gz: creating temporary file: open /var/tmp/docker-tar1213702538: no such file or directory"
mkdir -p /var/tmp/
# Release
2023-05-04 12:59:44 +00:00
nix run .#publish-static
nix run .#publish-garage
nix run .#publish-docker-hub
fi