update build.sh

This commit is contained in:
Nico Schottelius 2024-02-20 22:15:55 +09:00
parent e8609561b3
commit 6de16ffd27
1 changed files with 8 additions and 3 deletions

View File

@ -2,15 +2,20 @@
set -exu
if [ $# -ne 2 ]; then
echo "$0 <container> <version>" >&2
if [ $# -lt 2 ]; then
echo "$0 <container> <version> [push]" >&2
exit 1
fi
container=$1; shift
version=$1; shift
name=harbor.k8s.ungleich.ch:ungleich-public/${container}
name=harbor.k8s.ungleich.ch/ungleich-public/${container}
tag=${name}:${version}
cd $container
docker build -t ${tag} .
if [ "$#" -ge 1 ]; then
docker push ${tag}
fi