mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

- making sure the DRY_RUN mode can finish e2e, so e.g. commits to local copy of repository are OK in dry-run (while git pushes are NOT). - better interaction with ./test_lib.sh script. - more consistent logging - bringing back s390x architecture that on go 1.14.3 seems to work as expected.
32 lines
779 B
Bash
Executable File
32 lines
779 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Build all release binaries and images to directory ./release.
|
|
# Run from repository root.
|
|
#
|
|
set -e
|
|
|
|
source ./scripts/test_lib.sh
|
|
|
|
VERSION=$1
|
|
if [ -z "${VERSION}" ]; then
|
|
echo "Usage: ${0} VERSION" >> /dev/stderr
|
|
exit 255
|
|
fi
|
|
|
|
if ! command -v docker >/dev/null; then
|
|
echo "cannot find docker"
|
|
exit 1
|
|
fi
|
|
|
|
ETCD_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
|
|
|
pushd "${ETCD_ROOT}" >/dev/null
|
|
log_callout "Building etcd binary..."
|
|
./scripts/build-binary "${VERSION}"
|
|
|
|
for TARGET_ARCH in "amd64" "arm64" "ppc64le" "s390x"; do
|
|
log_callout "Building ${TARGET_ARCH} docker image..."
|
|
GOOS=linux GOARCH=${TARGET_ARCH} BINARYDIR=release/etcd-${VERSION}-linux-${TARGET_ARCH} BUILDDIR=release ./scripts/build-docker "${VERSION}"
|
|
done
|
|
popd >/dev/null
|