build.sh (etcd-3.5.6) | : | build.sh (etcd-3.5.7) | ||
---|---|---|---|---|
skipping to change at line 100 | skipping to change at line 100 | |||
tools/etcd-dump-logs | tools/etcd-dump-logs | |||
tools/local-tester/bridge" | tools/local-tester/bridge" | |||
for tool in ${tools_path} | for tool in ${tools_path} | |||
do | do | |||
echo "Building" "'${tool}'"... | echo "Building" "'${tool}'"... | |||
run rm -f "${out}/${tool}" | run rm -f "${out}/${tool}" | |||
# shellcheck disable=SC2086 | # shellcheck disable=SC2086 | |||
run env GO_BUILD_FLAGS="${GO_BUILD_FLAGS}" CGO_ENABLED=0 go build ${GO_BUILD _FLAGS} \ | run env GO_BUILD_FLAGS="${GO_BUILD_FLAGS}" CGO_ENABLED=0 go build ${GO_BUILD _FLAGS} \ | |||
-trimpath \ | -trimpath \ | |||
-installsuffix=cgo \ | -installsuffix=cgo \ | |||
"-ldflags='${GO_LDFLAGS[*]}'" \ | "-ldflags=${GO_LDFLAGS[*]}" \ | |||
-o="${out}/${tool}" "./${tool}" || return 2 | -o="${out}/${tool}" "./${tool}" || return 2 | |||
done | done | |||
tests_build "${@}" | tests_build "${@}" | |||
} | } | |||
tests_build() { | tests_build() { | |||
out="bin" | out="bin" | |||
if [[ -n "${BINDIR}" ]]; then out="${BINDIR}"; fi | if [[ -n "${BINDIR}" ]]; then out="${BINDIR}"; fi | |||
tools_path=" | tools_path=" | |||
functional/cmd/etcd-agent | functional/cmd/etcd-agent | |||
skipping to change at line 123 | skipping to change at line 123 | |||
functional/cmd/etcd-tester" | functional/cmd/etcd-tester" | |||
( | ( | |||
cd tests || exit 2 | cd tests || exit 2 | |||
for tool in ${tools_path}; do | for tool in ${tools_path}; do | |||
echo "Building" "'${tool}'"... | echo "Building" "'${tool}'"... | |||
run rm -f "../${out}/${tool}" | run rm -f "../${out}/${tool}" | |||
# shellcheck disable=SC2086 | # shellcheck disable=SC2086 | |||
run env CGO_ENABLED=0 GO_BUILD_FLAGS="${GO_BUILD_FLAGS}" go build ${GO_BUI LD_FLAGS} \ | run env CGO_ENABLED=0 GO_BUILD_FLAGS="${GO_BUILD_FLAGS}" go build ${GO_BUI LD_FLAGS} \ | |||
-installsuffix=cgo \ | -installsuffix=cgo \ | |||
"-ldflags='${GO_LDFLAGS[*]}'" \ | "-ldflags=${GO_LDFLAGS[*]}" \ | |||
-o="../${out}/${tool}" "./${tool}" || return 2 | -o="../${out}/${tool}" "./${tool}" || return 2 | |||
done | done | |||
) || return 2 | ) || return 2 | |||
} | } | |||
toggle_failpoints_default | toggle_failpoints_default | |||
# only build when called directly, not sourced | # only build when called directly, not sourced | |||
if echo "$0" | grep -E "build(.sh)?$" >/dev/null; then | if echo "$0" | grep -E "build(.sh)?$" >/dev/null; then | |||
if etcd_build; then | if etcd_build; then | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |