#!/bin/sh

set -e

VERSION="$1"
test -n "${VERSION}"

git checkout main
git pull
git checkout "${VERSION}"
git submodule update --init

docker buildx build --push --no-cache --platform linux/amd64,linux/arm64 --tag derfnull/dbris-m:${VERSION} --tag derfnull/dbris-m:latest .
