Merge pull request #34704 from seemethere/add_overwriteable_version

Allows VERSION to be overwritten by env variable
This commit is contained in:
Yong Tang 2017-09-04 16:47:52 -07:00 committed by GitHub
commit 9e0a1845f2
2 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,8 @@ DOCKER_ENVS := \
-e NO_PROXY \
-e http_proxy \
-e https_proxy \
-e no_proxy
-e no_proxy \
-e VERSION
# note: we _cannot_ add "-e DOCKER_BUILDTAGS" here because even if it's unset in the shell, that would shadow the "ENV DOCKER_BUILDTAGS" set in our Dockerfile, which is very important for our official builds
# to allow `make BIND_DIR=. shell` or `make BIND_DIR= test`

View File

@ -67,7 +67,7 @@ DEFAULT_BUNDLES=(
tgz
)
VERSION=$(< ./VERSION)
VERSION=${VERSION:-$(< ./VERSION)}
! BUILDTIME=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')
if [ "$DOCKER_GITCOMMIT" ]; then
GITCOMMIT="$DOCKER_GITCOMMIT"