Fix the RELEASE_VERSION unbound issue 11/30411/1
authorhelenyao <yaohelan@huawei.com>
Tue, 14 Mar 2017 11:17:01 +0000 (19:17 +0800)
committerhelenyao <yaohelan@huawei.com>
Tue, 14 Mar 2017 11:20:26 +0000 (19:20 +0800)
'RELEASE_VERSION: unbound variable' popped up when building stable docker image

Change-Id: I5d4582aea2f154e0bc34cdccdd05b9df64032ed2
Signed-off-by: helenyao <yaohelan@huawei.com>
jjb/releng/opnfv-docker.sh

index ded743d..302feb0 100644 (file)
@@ -64,7 +64,7 @@ echo "Current branch: $BRANCH"
 if [[ "$BRANCH" == "master" ]]; then
     DOCKER_TAG="latest"
 else
-    if [[ "$RELEASE_VERSION" != "" ]]; then
+    if [[ -n "${RELEASE_VERSION-}" ]]; then
         release=${BRANCH##*/}
         DOCKER_TAG=${release}.${RELEASE_VERSION}
         # e.g. colorado.1.0, colorado.2.0, colorado.3.0