1 Star 0 Fork 0

DiDi-opensource/elastic-trib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.sh 824 Bytes
一键复制 编辑 原始数据 按行查看 历史
soarpenguin 提交于 2019-06-15 00:09 . init commit.
#! /bin/bash
VERSION=v0.1.$(git rev-parse --short HEAD)
echo $VERSION
[ -d /usr/local/go1.7 ] && {
export GOROOT=/usr/local/go1.7/
export PATH=/usr/local/go1.7/bin/:$PATH
}
export GOPATH=$(pwd)/gopath/
go version
ROOT=./
mkdir -p gopath/src/elastic-trib/
rsync -arvz ${ROOT}/Makefile ${ROOT}/elastic-trib.yaml ${ROOT}/*.go gopath/src/elastic-trib
rsync -arvz ${ROOT}/vendor/ gopath/src/elastic-trib
rsync -arvz ${ROOT}/vendor/ gopath/src/
output=${PWD}/output
echo "Building elastic-trib"
cd gopath/src/elastic-trib
go build -i -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION}" -o ${output}/elastic-trib .
if [ "$?" != "0" ]; then
echo "build elastic-trib failed"
cd - && rm -rf ./gopath
exit 1
fi
cp -rf elastic-trib.yaml ${output}/
cd - && rm -rf ./gopath
echo "end building"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/didiopensource/elastic-trib.git
git@gitee.com:didiopensource/elastic-trib.git
didiopensource
elastic-trib
elastic-trib
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385