Skip to content

Commit

Permalink
scripts: add release.sh
Browse files Browse the repository at this point in the history
It could build all binaries and images for the given version.
  • Loading branch information
yichengq committed Sep 9, 2015
1 parent 1843375 commit 7d4cd7c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
#
# Build all release binaries and images to directory ./release.
# Run from repository root.
#
set -e

VERSION=$1
if [ -z "${VERSION}" ]; then
echo "Usage: ${0} VERSION" >> /dev/stderr
exit 255
fi

# A non-installed actool can be used, for example:
# ACTOOL=../../appc/spec/bin/actool
ACTOOL=${ACTOOL:-actool}
if ! command -v $ACTOOL >/dev/null; then
echo "cannot find actool ($ACTOOL)"
exit 1
fi

if ! command -v docker >/dev/null; then
echo "cannot find docker"
exit 1
fi

ETCD_ROOT=$(dirname "${BASH_SOURCE}")/..

pushd ${ETCD_ROOT} >/dev/null
echo Building etcd binary...
./scripts/build-binary ${VERSION}
echo Building aci image...
BINARYDIR=release/etcd-${VERSION}-linux-amd64 BUILDDIR=release ./scripts/build-aci ${VERSION}
echo Building docker image...
BINARYDIR=release/etcd-${VERSION}-linux-amd64 BUILDDIR=release ./scripts/build-docker ${VERSION}
popd >/dev/null

0 comments on commit 7d4cd7c

Please sign in to comment.