Update create_frontend_env.sh

This commit is contained in:
Pascal Vizeli 2017-07-10 22:13:27 +02:00 committed by GitHub
parent 704886b57d
commit f52470c583

View file

@ -3,6 +3,7 @@ set -e
DOCKER_IMAGE=${DOCKER_IMAGE:="homeassistant/frontend-build-env"}
DOCKER_PUSH="false"
DOCKER_TAG="$(date +%Y%m%d)"
# Get the absolute script location
pushd "$(dirname "$0")" > /dev/null 2>&1
@ -18,8 +19,6 @@ Options:
-h, --help
Display this help and exit.
-t, --tag TAG
Version/Tag of $DOCKER_IMAGE.
-p, --push
Upload the build to docker hub.
EOF
@ -33,10 +32,6 @@ while [[ $# -gt 0 ]]; do
help
exit 0
;;
-t|--tag)
DOCKER_TAG=$2
shift
;;
-p|--push)
DOCKER_PUSH="true"
;;
@ -47,12 +42,6 @@ while [[ $# -gt 0 ]]; do
shift
done
if [ -z "$DOCKER_TAG" ]; then
echo "[ERROR] please set a tag!"
help
exit 1
fi
# Build
docker build --pull --tag "$DOCKER_IMAGE:$DOCKER_TAG" -f "$SCRIPTPATH/Dockerfile" "$SCRIPTPATH"