Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
build_linux_amd64.sh 7.75 KB
Copy Edit Raw Blame History
svaroqui authored 2018-01-08 17:30 . Add WithBackup compile flag
#!/usr/bin/env sh
# These are the values we want to pass for VERSION and BUILD
# git tag 1.0.1
# git commit -am "One more change after the tags"
set -e
VERSION=$(git describe --abbrev=0 --tags)
FULLVERSION=$(git describe --tags)
BUILD=$(date +%FT%T%z)
TAR="-X main.WithTarball=ON"
BINARY=replication-manager-osc
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo server" --ldflags "-extldflags 'static' -w -s -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=OFF -X main.WithOpenSVC=OFF -X main.WithHaproxy=ON -X main.WithMaxscale=ON -X main.WithMariadbshardproxy=ON -X main.WithProxysql=ON -X main.WithSphinx=ON -X main.WithArbitration=OFF -X main.WithArbitrationClient=ON -X main.WithMonitoring=ON -X main.WithHttp=ON -X main.WithBackup=ON -X main.WithMail=ON -X main.WithEnforce=ON -X main.WithDeprecate=ON" ${LDFLAGS} -o ${BINARY}
BINARY=replication-manager-osc-basedir
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo server" --ldflags "-extldflags 'static' -w -s $TAR -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=OFF -X main.WithOpenSVC=OFF -X main.WithHaproxy=ON -X main.WithMaxscale=ON -X main.WithMariadbshardproxy=ON -X main.WithProxysql=ON -X main.WithSphinx=ON -X main.WithArbitration=OFF -X main.WithArbitrationClient=ON -X main.WithMonitoring=ON -X main.WithHttp=ON -X main.WithBackup=ON -X main.WithMail=ON -X main.WithEnforce=ON -X main.WithDeprecate=ON" ${LDFLAGS} -o ${BINARY}
BINARY=replication-manager-tst
env GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo server" --ldflags "-w -s -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=ON -X main.WithOpenSVC=OFF -X main.WithHaproxy=ON -X main.WithMaxscale=ON -X main.WithMariadbshardproxy=ON -X main.WithProxysql=ON -X main.WithSphinx=ON -X main.WithArbitration=OFF -X main.WithArbitrationClient=ON -X main.WithMonitoring=ON -X main.WithHttp=ON -X main.WithBackup=ON -X main.WithMail=ON -X main.WithEnforce=ON -X main.WithDeprecate=OFF" ${LDFLAGS} -o ${BINARY}
BINARY=replication-manager-tst-basedir
env GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo server" --ldflags "-w -s $TAR -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=ON -X main.WithOpenSVC=OFF -X main.WithHaproxy=ON -X main.WithMaxscale=ON -X main.WithMariadbshardproxy=ON -X main.WithProxysql=ON -X main.WithSphinx=ON -X main.WithArbitration=OFF -X main.WithArbitrationClient=ON -X main.WithMonitoring=ON -X main.WithHttp=ON -X main.WithBackup=ON -X main.WithMail=ON -X main.WithEnforce=ON -X main.WithDeprecate=OFF" ${LDFLAGS} -o ${BINARY}
BINARY=replication-manager-pro
env GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo server" --ldflags "-w -s -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=ON -X main.WithOpenSVC=ON -X main.WithHaproxy=ON -X main.WithMaxscale=ON -X main.WithMariadbshardproxy=ON -X main.WithProxysql=ON -X main.WithSphinx=ON -X main.WithArbitration=OFF -X main.WithArbitrationClient=ON -X main.WithMonitoring=ON -X main.WithHttp=ON -X main.WithBackup=ON -X main.WithMail=ON -X main.WithEnforce=ON -X main.WithDeprecate=ON" ${LDFLAGS} -o ${BINARY}
BINARY=replication-manager-pro-basedir
env GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo server" --ldflags "-w -s $TAR -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=ON -X main.WithOpenSVC=ON -X main.WithHaproxy=ON -X main.WithMaxscale=ON -X main.WithMariadbshardproxy=ON -X main.WithProxysql=ON -X main.WithSphinx=ON -X main.WithArbitration=OFF -X main.WithArbitrationClient=ON -X main.WithMonitoring=ON -X main.WithHttp=ON -X main.WithBackup=ON -X main.WithMail=ON -X main.WithEnforce=ON -X main.WithDeprecate=ON" ${LDFLAGS} -o ${BINARY}
BINARY=replication-manager-min
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo server" --ldflags "-extldflags 'static' -w -s -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=OFF -X main.WithOpenSVC=OFF -X main.WithHaproxy=OFF -X main.WithMaxscale=OFF -X main.WithMariadbshardproxy=OFF -X main.WithProxysql=OFF -X main.WithArbitration=OFF -X main.WithArbitrationClient=OFF -X main.WithMonitoring=OFF -X main.WithHttp=OFF -X main.WithMail=ON -X main.WithEnforce=OFF -X main.WithDeprecate=OFF" ${LDFLAGS} -o ${BINARY}
BINARY=replication-manager-min-basedir
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo server" --ldflags "-extldflags 'static' -w -s $TAR -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=OFF -X main.WithOpenSVC=OFF -X main.WithHaproxy=OFF -X main.WithMaxscale=OFF -X main.WithMariadbshardproxy=OFF -X main.WithProxysql=OFF -X main.WithArbitration=OFF -X main.WithArbitrationClient=OFF -X main.WithMonitoring=OFF -X main.WithHttp=OFF -X main.WithMail=ON -X main.WithEnforce=OFF -X main.WithDeprecate=OFF" ${LDFLAGS} -o ${BINARY}
BINARY=replication-manager-cli
env GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo clients" --ldflags "-w -s -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=ON -X main.WithOpenSVC=ON -X main.WithHaproxy=ON -X main.WithMaxscale=ON -X main.WithMariadbshardproxy=ON -X main.WithProxysql=ON -X main.WithSphinx=ON -X main.WithArbitration=OFF -X main.WithArbitrationClient=OFF -X main.WithMonitoring=ON -X main.WithHttp=ON -X main.WithBackup=ON -X main.WithMail=ON -X main.WithEnforce=ON -X main.WithDeprecate=ON" ${LDFLAGS} -o ${BINARY}
BINARY=replication-manager-arb
env GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo arbitrator" --ldflags "-w -s -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=ON -X main.WithOpenSVC=ON -X main.WithHaproxy=ON -X main.WithMaxscale=ON -X main.WithMariadbshardproxy=ON -X main.WithProxysql=ON -X main.WithSphinx=ON -X main.WithArbitration=ON -X main.WithMonitoring=ON -X main.WithHttp=ON -X main.WithBackup=ON -X main.WithMail=ON -X main.WithEnforce=ON -X main.WithDeprecate=ON" ${LDFLAGS} -o ${BINARY}
#BINARY=mrm-test
#env GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo server" --ldflags "-w -s -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=ON -X main.WithOpenSVC=ON -X main.WithHaproxy=OFF -X main.WithMaxscale=OFF -X main.WithMariadbshardproxy=OFF -X main.WithProxysql=OFF -X main.WithArbitration=OFF -X main.WithMonitoring=OFF -X main.WithHttp=OFF -X main.WithMail=ON -X main.WithEnforce=OFF -X main.WithDeprecate=OFF" ${LDFLAGS} -o ${BINARY}
#BINARY=mrm-cli
#env GOOS=linux GOARCH=amd64 go build -a -v --tags "netgo clients" --ldflags "-w -s -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=${VERSION} -X main.FullVersion=${FULLVERSION} -X main.Build=${BUILD} -X main.WithProvisioning=ON -X main.WithOpenSVC=ON -X main.WithHaproxy=OFF -X main.WithMaxscale=OFF -X main.WithMariadbshardproxy=OFF -X main.WithProxysql=OFF -X main.WithArbitration=OFF -X main.WithMonitoring=OFF -X main.WithHttp=OFF -X main.WithMail=ON -X main.WithEnforce=OFF -X main.WithDeprecate=OFF" ${LDFLAGS} -o ${BINARY}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化