Skip to content

Commit e68c260

Browse files
TankTianWillemJiang
authored andcommitted
JAV-14 Use travis ci to compile service-center. (#9)
1 parent f067738 commit e68c260

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ language: go
22
sudo: false
33
go:
44
- 1.7.3
5+
6+
install: true
57

68
script:
7-
- CGO_ENABLED=1 GOARCH=amd64 GOOS=linux go build -o servicecenter github.com/servicecomb/service-center
9+
- bash +x scripts/build.sh
810

911
after_success:
1012
- bash <(curl -s https://codecov.io/bash)

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# service-center [![Build Status](https://travis-ci.org/ServiceComb/service-center.svg?branch=master)](https://travis-ci.org/ServiceComb/service-center)
22
A standalone service center to allow services to register their instance information and to discover providers of a given service
3-
EDIT1

scripts/build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export OLD_PATH=$(pwd)
2+
export BUILD_TEMP_PATH=src/github.com/servicecomb/service-center
3+
cd ..
4+
rm -rf src
5+
mkdir -p $BUILD_TEMP_PATH
6+
cp -r $OLD_PATH/* $BUILD_TEMP_PATH
7+
export GOPATH=$(pwd)
8+
cd $BUILD_TEMP_PATH
9+
CGO_ENABLED=0 GO_EXTLINK_ENABLED=0 go build --ldflags '-w -extldflags "-static"' -o servicecenter

0 commit comments

Comments
 (0)