#!/bin/bash

set -e

if [ $# -eq 0 ]
  then
    echo "Specify a branch name, a tag, or a commit hash"
    exit 1
fi

REPO=$(git config --get remote.origin.url)
IMG_NAME="hut6/$(basename -s .git $REPO):$1"

docker push $IMG_NAME
