|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -o errexit
|
|
|
|
|
|
|
|
MODULE_NAME=$(grep module src/go.mod |cut -d ' ' -f 2)
|
|
|
|
|
|
|
|
# older version Git don't support --short !
|
|
|
|
if [ -d ".git" ];then
|
|
|
|
#branch=`git symbolic-ref --short -q HEAD`
|
|
|
|
branch=$(git symbolic-ref -q HEAD | awk -F'/' '{print $3;}')
|
|
|
|
cid=$(git rev-parse HEAD)
|
|
|
|
else
|
|
|
|
branch="unknown"
|
|
|
|
cid="0.0"
|
|
|
|
fi
|
|
|
|
branch=$branch","$cid
|
|
|
|
|
|
|
|
export GOBIN=$(pwd)/bin/
|
|
|
|
integration_test=$GOBIN/integration-test
|
|
|
|
|
|
|
|
|
|
|
|
# make sure we're in the directory where the script lives
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
cd "$SCRIPT_DIR"
|
|
|
|
|
|
|
|
info="redis-shake/common.Version=$branch"
|
|
|
|
# golang version
|
|
|
|
goversion=$(go version | awk -F' ' '{print $3;}')
|
|
|
|
info=$info","$goversion
|
|
|
|
bigVersion=$(echo $goversion | awk -F'[o.]' '{print $2}')
|
|
|
|
midVersion=$(echo $goversion | awk -F'[o.]' '{print $3}')
|
|
|
|
if [ $bigVersion -lt "1" -o $bigVersion -eq "1" -a $midVersion -lt "6" ]; then
|
|
|
|
echo "go version[$goversion] must >= 1.6"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
t=$(date "+%Y-%m-%d_%H:%M:%S")
|
|
|
|
info=$info","$t
|
|
|
|
|
|
|
|
echo "[ BUILD RELEASE ]"
|
|
|
|
run_builder='go build -v'
|
|
|
|
|
|
|
|
main_package="$MODULE_NAME/redis-shake/main"
|
|
|
|
|
|
|
|
cd src
|
|
|
|
goos=(linux darwin windows)
|
|
|
|
for g in "${goos[@]}"; do
|
|
|
|
export GOOS=$g
|
|
|
|
echo "try build goos=$g"
|
Feature 2.0 (#276)
* add CI
* in debug CI
* in debug CI
* in debug CI
* in debugging CI
* in debug CI
* in debugging CI
* in debug CI 2
* split sync code from sync.go to dbSync directory to make code clean
* finish adjust sync mode code
* update a lit
* add cluster node list judge, only accpet role master. see #149
* update ChangeLog
* update ChangeLOG 2
* add CI
* in debug CI
* in debug CI
* in debug CI
* in debugging CI
* in debug CI
* in debugging CI
* in debug CI 2
* split sync code from sync.go to dbSync directory to make code clean
* finish adjust sync mode code
* update a lit
* add cluster node list judge, only accpet role master. see #149
* update ChangeLog
* update ChangeLOG 2
* merge commit in feature-1.6 manually. see pull/201
* resuming from break-point, in coding
* add resume_from_break_point in configuration
* resuming from break-point, in coding 2
* resuming from break-point, finish offset adjust
* merge v1.6.24 manully
* update some metrics
* update, add run-id
* almost finish resume from break-point
* polish resume from breakpoint
* release 1.7-unstable v1
* modify ChangeLog
* restore add parameters judge when version >= 5.0
* cherry pick 3ea30b05365d679a02248150b4c9987f0c65e98c
* update redis-go-cluster to add more log details
* cherry pick 0e10b0defa7726bd02b5b10620ef79618a547cb3
* bugfix of sendId, see #222
* improve: rename used -> available in delayChan. see #233
* block password, see #229
* set auth_type to 'auth' as default, see #237
* release v1.6.26
* modify ChangeLog
* polish conf comment
* merge 16.27 manually
* 1. polish conf 2. add filter key for redis-shake-checkpoint
* 1. polish conf 2. add filter key for redis-shake-checkpoint2
* unify offset by only one, step 1: modify checkpoint and add ut
* unify offset by only one, step 2: modify syncIncrease.go. haven't test yet
* unify offset by only one, step 3: finish test
* finish cluster resuming from break point and pass simple test
* update driver
* add picture of resuming from break point
* add picture of resuming from break point
* add checkpoint and conf version
* cherry pick 1d6c8ed83f35ae41c7f49d21a3b8d2f5d04ff166 from v1.6.28
* modify the checkpoint fcv
* release v2.0
* merge v1.6.28
* update redis-go-cluster to remove SELECT judge, see #273
* disable target.db when enable resume_from_break_point
* release v2.0.1
4 years ago
|
|
|
|
|
|
|
$run_builder -ldflags "-X $info" -o "$GOBIN/redis-shake.$g" $main_package
|
|
|
|
echo "build $g successfully!"
|
|
|
|
done
|
Feature 2.0 (#276)
* add CI
* in debug CI
* in debug CI
* in debug CI
* in debugging CI
* in debug CI
* in debugging CI
* in debug CI 2
* split sync code from sync.go to dbSync directory to make code clean
* finish adjust sync mode code
* update a lit
* add cluster node list judge, only accpet role master. see #149
* update ChangeLog
* update ChangeLOG 2
* add CI
* in debug CI
* in debug CI
* in debug CI
* in debugging CI
* in debug CI
* in debugging CI
* in debug CI 2
* split sync code from sync.go to dbSync directory to make code clean
* finish adjust sync mode code
* update a lit
* add cluster node list judge, only accpet role master. see #149
* update ChangeLog
* update ChangeLOG 2
* merge commit in feature-1.6 manually. see pull/201
* resuming from break-point, in coding
* add resume_from_break_point in configuration
* resuming from break-point, in coding 2
* resuming from break-point, finish offset adjust
* merge v1.6.24 manully
* update some metrics
* update, add run-id
* almost finish resume from break-point
* polish resume from breakpoint
* release 1.7-unstable v1
* modify ChangeLog
* restore add parameters judge when version >= 5.0
* cherry pick 3ea30b05365d679a02248150b4c9987f0c65e98c
* update redis-go-cluster to add more log details
* cherry pick 0e10b0defa7726bd02b5b10620ef79618a547cb3
* bugfix of sendId, see #222
* improve: rename used -> available in delayChan. see #233
* block password, see #229
* set auth_type to 'auth' as default, see #237
* release v1.6.26
* modify ChangeLog
* polish conf comment
* merge 16.27 manually
* 1. polish conf 2. add filter key for redis-shake-checkpoint
* 1. polish conf 2. add filter key for redis-shake-checkpoint2
* unify offset by only one, step 1: modify checkpoint and add ut
* unify offset by only one, step 2: modify syncIncrease.go. haven't test yet
* unify offset by only one, step 3: finish test
* finish cluster resuming from break point and pass simple test
* update driver
* add picture of resuming from break point
* add picture of resuming from break point
* add checkpoint and conf version
* cherry pick 1d6c8ed83f35ae41c7f49d21a3b8d2f5d04ff166 from v1.6.28
* modify the checkpoint fcv
* release v2.0
* merge v1.6.28
* update redis-go-cluster to remove SELECT judge, see #273
* disable target.db when enable resume_from_break_point
* release v2.0.1
4 years ago
|
|
|
unset GOOS
|
|
|
|
|
|
|
|
# build integration test
|
|
|
|
$run_builder -o "${integration_test}/integration-test" "$MODULE_NAME/integration-test/main"
|
|
|
|
cd ..
|
|
|
|
# copy scripts
|
|
|
|
cp scripts/start.sh ${GOBIN}/
|
|
|
|
cp scripts/stop.sh ${GOBIN}/
|
Feature 2.0 (#276)
* add CI
* in debug CI
* in debug CI
* in debug CI
* in debugging CI
* in debug CI
* in debugging CI
* in debug CI 2
* split sync code from sync.go to dbSync directory to make code clean
* finish adjust sync mode code
* update a lit
* add cluster node list judge, only accpet role master. see #149
* update ChangeLog
* update ChangeLOG 2
* add CI
* in debug CI
* in debug CI
* in debug CI
* in debugging CI
* in debug CI
* in debugging CI
* in debug CI 2
* split sync code from sync.go to dbSync directory to make code clean
* finish adjust sync mode code
* update a lit
* add cluster node list judge, only accpet role master. see #149
* update ChangeLog
* update ChangeLOG 2
* merge commit in feature-1.6 manually. see pull/201
* resuming from break-point, in coding
* add resume_from_break_point in configuration
* resuming from break-point, in coding 2
* resuming from break-point, finish offset adjust
* merge v1.6.24 manully
* update some metrics
* update, add run-id
* almost finish resume from break-point
* polish resume from breakpoint
* release 1.7-unstable v1
* modify ChangeLog
* restore add parameters judge when version >= 5.0
* cherry pick 3ea30b05365d679a02248150b4c9987f0c65e98c
* update redis-go-cluster to add more log details
* cherry pick 0e10b0defa7726bd02b5b10620ef79618a547cb3
* bugfix of sendId, see #222
* improve: rename used -> available in delayChan. see #233
* block password, see #229
* set auth_type to 'auth' as default, see #237
* release v1.6.26
* modify ChangeLog
* polish conf comment
* merge 16.27 manually
* 1. polish conf 2. add filter key for redis-shake-checkpoint
* 1. polish conf 2. add filter key for redis-shake-checkpoint2
* unify offset by only one, step 1: modify checkpoint and add ut
* unify offset by only one, step 2: modify syncIncrease.go. haven't test yet
* unify offset by only one, step 3: finish test
* finish cluster resuming from break point and pass simple test
* update driver
* add picture of resuming from break point
* add picture of resuming from break point
* add checkpoint and conf version
* cherry pick 1d6c8ed83f35ae41c7f49d21a3b8d2f5d04ff166 from v1.6.28
* modify the checkpoint fcv
* release v2.0
* merge v1.6.28
* update redis-go-cluster to remove SELECT judge, see #273
* disable target.db when enable resume_from_break_point
* release v2.0.1
4 years ago
|
|
|
#cp scripts/run_direct.py ${output}/
|
|
|
|
cp -r tools ${integration_test}/
|
|
|
|
cp -r test ${integration_test}/
|
|
|
|
|
|
|
|
if [ "Linux" == "$(uname -s)" ];then
|
|
|
|
# hypervisor
|
|
|
|
gcc -Wall -O3 scripts/hypervisor.c -o ${output}/hypervisor -lpthread
|
|
|
|
elif [ "Darwin" == "$(uname -s)" ];then
|
|
|
|
printf "\\nWARNING !!! MacOS doesn't supply hypervisor\\n"
|
|
|
|
fi
|