diff --git a/Makefile b/Makefile index b0e6e423..5b020e72 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ jepsen_base_img: docker build --tag=mysync-jepsen-test-base tests/images/jepsen_common test: - GOOS=linux go build -o ./cmd/mysync/mysync ./cmd/mysync/... + GOOS=linux go build -ldflags "-linkmode external -extldflags -static" -o ./cmd/mysync/mysync ./cmd/mysync/... go build ./tests/... rm -fr ./tests/images/mysql/mysync && cp ./cmd/mysync/mysync ./tests/images/mysql/mysync rm -rf ./tests/logs @@ -30,7 +30,7 @@ test: (cd tests; go test -timeout 150m) jepsen_test: - GOOS=linux go build -o ./cmd/mysync/mysync ./cmd/mysync/... + GOOS=linux go build -ldflags "-linkmode external -extldflags -static" -o ./cmd/mysync/mysync ./cmd/mysync/... go build ./tests/... rm -fr ./tests/images/mysql_jepsen/mysync && cp ./cmd/mysync/mysync ./tests/images/mysql_jepsen/mysync docker-compose -p mysync -f ./tests/images/jepsen-compose.yml up -d --force-recreate --build