#!/usr/bin/env bash
set -euo pipefail

if [[ -z "${1:-}" || "$1" == '--help' || "$1" == '-h' ]]; then
  echo "Usage: $0 TAG"
  exit 1
fi

tag="$1"
image_name="argus.docker.zooxlabs.com/argus-video-worker:$tag"

cd "$(dirname "$0")"

docker build -f Dockerfile --tag $image_name ..
docker push $image_name

echo Success!
