TAG=$(git rev-parse --short HEAD)
NAME="docker.dezendorf.net/whisparr"
YAML="../../dezendorf/homelab/k3s/media/whisparr.yaml"
docker build -t ${NAME}:${TAG} . < Dockerfile
docker push ${NAME}:${TAG}
docker push ${NAME}:latest

echo "Built and pushed:"
echo "  ${NAME}:${TAG}"
echo "  ${NAME}:latest"

sed -i -e "s#$NAME:.*#$NAME:$TAG#g" ${YAML}
git add ${YAML}


