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