You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by li...@apache.org on 2021/02/07 11:38:45 UTC

[apisix-dashboard] branch v2.4 updated: fix: the git commit hash in the docker is empty string (#1446) (#1454)

This is an automated email from the ASF dual-hosted git repository.

liuxiran pushed a commit to branch v2.4
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/v2.4 by this push:
     new 45ac0e2  fix: the git commit hash in the docker is empty string (#1446) (#1454)
45ac0e2 is described below

commit 45ac0e2ee955e3c483376d200c54f37e7be6acf4
Author: Joey <ma...@apache.org>
AuthorDate: Sun Feb 7 19:38:39 2021 +0800

    fix: the git commit hash in the docker is empty string (#1446) (#1454)
    
    Co-authored-by: nic-chen <33...@users.noreply.github.com>
---
 Dockerfile                        | 7 ++++---
 api/VERSION                       | 2 +-
 api/test/shell/manager_smoking.sh | 6 ++++++
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index cb4b54b..ec11b85 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,9 +19,10 @@ FROM alpine:latest as pre-build
 ARG APISIX_DASHBOARD_VERSION=master
 
 RUN set -x \
-    && wget https://github.com/apache/apisix-dashboard/archive/${APISIX_DASHBOARD_VERSION}.tar.gz -O /tmp/apisix-dashboard.tar.gz \
-    && mkdir /usr/local/apisix-dashboard \
-    && tar -xvf /tmp/apisix-dashboard.tar.gz -C /usr/local/apisix-dashboard --strip 1
+    && apk add --no-cache --virtual .builddeps git \
+    && git clone https://github.com/apache/apisix-dashboard.git -b ${APISIX_DASHBOARD_VERSION} /usr/local/apisix-dashboard \
+    && cd /usr/local/apisix-dashboard && git clean -Xdf \
+    && rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash
 
 FROM golang:1.14 as api-builder
 
diff --git a/api/VERSION b/api/VERSION
index 1f7391f..bb576db 100644
--- a/api/VERSION
+++ b/api/VERSION
@@ -1 +1 @@
-master
+2.3
diff --git a/api/test/shell/manager_smoking.sh b/api/test/shell/manager_smoking.sh
index cd76560..d4d9475 100755
--- a/api/test/shell/manager_smoking.sh
+++ b/api/test/shell/manager_smoking.sh
@@ -52,6 +52,12 @@ else
 	    echo "no Version output"
 	    exit 1
 	fi
+	# Version output
+	hashline=$(docker logs docker-deploy_managerapi_1 | grep -E "^GitHash : [A-Za-z0-9\-\_\.]+")
+	if [ -z "$hashline" ];then
+	    echo "no GitHash output"
+	    exit 1
+	fi
 fi