scripts: Integrate ./scripts/release with new code for tagging modules.

Changes:
  - signing tags.
  - allows to override BRANCH and REPOSITORY using env variables.

Tested by a release in my private fork:
  BRANCH="20201126-ptabor-release" REPOSITORY="git@github.com:ptabor/etcd.git" ./scripts/release 3.5.0-alpha.20
This commit is contained in:
Piotr Tabor
2020-11-27 11:11:09 +01:00
parent c95d9434f1
commit 577c898fee
12 changed files with 308 additions and 168 deletions

View File

@@ -5,6 +5,8 @@
#
set -e
source ./scripts/test_lib.sh
VERSION=$1
if [ -z "${VERSION}" ]; then
echo "Usage: ${0} VERSION" >> /dev/stderr
@@ -19,11 +21,12 @@ fi
ETCD_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
pushd "${ETCD_ROOT}" >/dev/null
echo Building etcd binary...
log_callout "Building etcd binary..."
./scripts/build-binary "${VERSION}"
for TARGET_ARCH in "amd64" "arm64" "ppc64le" "s390x"; do
echo Building ${TARGET_ARCH} docker image...
# TODO: Add "s390x" when https://github.com/etcd-io/etcd/issues/12496 is fixed.
for TARGET_ARCH in "amd64" "arm64" "ppc64le"; 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