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

tianxiaoliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git


The following commit(s) were added to refs/heads/master by this push:
     new a63ac22  Fix: failed to startup with embedded etcd (#1038)
a63ac22 is described below

commit a63ac229d13c5f2f9dd255afb0032fec2d9ca873
Author: little-cui <sure_0...@qq.com>
AuthorDate: Thu Jun 3 09:42:09 2021 +0800

    Fix: failed to startup with embedded etcd (#1038)
---
 go.sum                                              |  5 +++++
 scripts/build/tools.sh                              | 21 ++++++++++++++-------
 scripts/release/make_release.sh                     |  2 ++
 .../start_scripts/darwin/start-service-center.sh    |  2 --
 4 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/go.sum b/go.sum
index 3c1c0aa..974f07c 100644
--- a/go.sum
+++ b/go.sum
@@ -264,6 +264,7 @@ github.com/gin-gonic/gin v1.4.0/go.mod 
h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/
 github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c 
h1:iRTj5SRYwbvsygdwVp+y9kZT145Y1s6xOPpeOEIeGc4=
 github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod 
h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw=
 github.com/go-chassis/cari v0.0.0-20201210041921-7b6fbef2df11/go.mod 
h1:MgtsEI0AM4Ush6Lyw27z9Gk4nQ/8GWTSXrFzupawWDM=
+github.com/go-chassis/cari v0.3.0/go.mod 
h1:Ie2lW11Y5ZFClY9z7bhAwK6BoNxqGSf3fYGs4mPFs74=
 github.com/go-chassis/cari v0.3.1-0.20210508100214-a13e083de04e 
h1:YLXfK7pSRsYK7EzUnv7WDgJNOHQSXz+UIEbOF86XI6Q=
 github.com/go-chassis/cari v0.3.1-0.20210508100214-a13e083de04e/go.mod 
h1:Ie2lW11Y5ZFClY9z7bhAwK6BoNxqGSf3fYGs4mPFs74=
 github.com/go-chassis/cari v0.3.1-0.20210519092219-69f9f0fc3452 
h1:G2Qlpg17t0oULhz0Eu3NQgkxKDcNbpGpmgtMR6RZvwk=
@@ -291,8 +292,12 @@ github.com/go-chassis/go-archaius v1.5.1 
h1:1FrNyzzmD6o6BIjPF8uQ4Cc+u7qYIgQTpDk8
 github.com/go-chassis/go-archaius v1.5.1/go.mod 
h1:QPwvvtBxvwiC48rmydoAqxopqOr93RCQ6syWsIkXPXQ=
 github.com/go-chassis/go-chassis/v2 v2.1.2-0.20210310004133-c9bc42149a18 
h1:bVzPkc+t08hN3YtKBv+icjQ0x6BZInbeyRil1q6qwvY=
 github.com/go-chassis/go-chassis/v2 
v2.1.2-0.20210310004133-c9bc42149a18/go.mod 
h1:NaewTJacOEr9P4gN7Am4x1D1cwUgNtEq9tnKMNOZ47M=
+github.com/go-chassis/go-chassis/v2 v2.2.0 
h1:CNr5Z+NJG2HRc+0jLiqufGhn8VuS3GA7i6PeO0JQvwc=
+github.com/go-chassis/go-chassis/v2 v2.2.0/go.mod 
h1:MpPxktD43gexx3qrOZM90gnoY3/uRHMRiYEeBmcxUuc=
 github.com/go-chassis/go-restful-swagger20 
v1.0.3-0.20200310030431-17d80f34264f 
h1:5QmmNpVcGqIc6tuKNe5EAI4PA8Yn2EL9Oee7YdcJ4PE=
 github.com/go-chassis/go-restful-swagger20 
v1.0.3-0.20200310030431-17d80f34264f/go.mod 
h1:eW62fYuzlNFDvIacB6AV8bhUDCTy4myfTCv0bT9Gbb0=
+github.com/go-chassis/go-restful-swagger20 v1.0.3 
h1:kWfeLwMwJZVkXP1zNyFpkmR41UZ55UTcOptTteXhvEs=
+github.com/go-chassis/go-restful-swagger20 v1.0.3/go.mod 
h1:eW62fYuzlNFDvIacB6AV8bhUDCTy4myfTCv0bT9Gbb0=
 github.com/go-chassis/kie-client v0.0.0-20201210060018-938c7680a9ab/go.mod 
h1:UTdbtyN5ge/v9DmQzdVRxQP7z51Q4z6hyl+W6ZpUHFM=
 github.com/go-chassis/kie-client v0.1.0 
h1:7iY0jVDVn6anT2Gh8CriViRqvyQOy9tUBUflVEkFZE4=
 github.com/go-chassis/kie-client v0.1.0/go.mod 
h1:UTdbtyN5ge/v9DmQzdVRxQP7z51Q4z6hyl+W6ZpUHFM=
diff --git a/scripts/build/tools.sh b/scripts/build/tools.sh
index a9c5099..f856676 100644
--- a/scripts/build/tools.sh
+++ b/scripts/build/tools.sh
@@ -41,16 +41,18 @@ fail() {
 
 install_bower() {
     set +e
-    BOWER=$(which bower)
+    local NPM=$(which npm)
+    set -e
     if [ "$?" == "1" ]; then
-        set -e
-
         curl -sL https://deb.nodesource.com/setup_8.x | bash -
         sudo apt-get install -y nodejs
+    fi
 
+    set +e
+    local BOWER=$(which bower)
+    set -e
+    if [ "$?" == "1" ]; then
         npm install -g bower
-    else
-        set -e
     fi
 }
 
@@ -131,8 +133,13 @@ package() {
     local app=$PACKAGE_PREFIX-$RELEASE-$GOOS-$GOARCH
 
     cp -r ${root_path}/etc/conf $app/
-    sed -i 's/^manager_cluster.*=.*/manager_name = \"sr-0\"\nmanager_addr = 
\"http:\/\/127.0.0.1:2380\"\nmanager_cluster = 
\"sr-0=http:\/\/127.0.0.1:2380\"/g' $app/conf/app.conf
-    sed -i 's/^registry_plugin.*=.*/registry_plugin = embeded_etcd/g' 
$app/conf/app.conf
+    cat <<EOF >> $app/conf/app.yaml
+SERVER_HOST: 0.0.0.0
+REGISTRY_KIND: embeded_etcd
+REGISTRY_ETCD_CLUSTER_NAME: sc-0
+REGISTRY_ETCD_CLUSTER_MANAGER_ENDPOINTS: http://127.0.0.1:2380
+REGISTRY_ETCD_CLUSTER_ENDPOINTS: sc-0=http://127.0.0.1:2380
+EOF
 
     ## Copy the Service-Center Releases
     cp -r ${root_path}/scripts/release/LICENSE $app/
diff --git a/scripts/release/make_release.sh b/scripts/release/make_release.sh
index e89534e..db577b5 100755
--- a/scripts/release/make_release.sh
+++ b/scripts/release/make_release.sh
@@ -49,6 +49,8 @@ esac
 
 ## Get the arch type
 export GOARCH=${4:-"amd64"}
+## build all components
+export BUILD="ALL"
 
 script_path=$(cd "$(dirname "$0")"; pwd)
 
diff --git a/scripts/release/start_scripts/darwin/start-service-center.sh 
b/scripts/release/start_scripts/darwin/start-service-center.sh
index 0a545be..23f187f 100644
--- a/scripts/release/start_scripts/darwin/start-service-center.sh
+++ b/scripts/release/start_scripts/darwin/start-service-center.sh
@@ -21,6 +21,4 @@ root_path=$(cd "$(dirname "$0")"; pwd)
 
 cd ${root_path}
 
-#sed -i "s|^runmode.*=.*$|runmode = prod|g" conf/app.conf
-
 ./service-center > start-sc.log 2>&1 &

Reply via email to