summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Nephin <dnephin@docker.com>2015-10-06 15:18:58 -0400
committerDaniel Nephin <dnephin@docker.com>2015-10-06 15:21:34 -0400
commit4ae2a0e6103849fbf9d9f412822d95c296953793 (patch)
tree486e85a34adf60318f16a648991a87f0696b259e
parent807ab897503458dcf4dd3d39969edc745a5c9f4b (diff)
Update release scripts for release image.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
-rw-r--r--Dockerfile.run6
-rw-r--r--docs/install.md2
-rw-r--r--project/RELEASE-PROCESS.md2
-rwxr-xr-xscript/build-image16
-rwxr-xr-xscript/release/build-binaries16
-rwxr-xr-xscript/release/push-release3
-rwxr-xr-xscript/run.sh (renamed from script/run)0
7 files changed, 39 insertions, 6 deletions
diff --git a/Dockerfile.run b/Dockerfile.run
index 3c12fa18..9f3745fe 100644
--- a/Dockerfile.run
+++ b/Dockerfile.run
@@ -7,9 +7,7 @@ RUN apk -U add \
COPY requirements.txt /code/requirements.txt
RUN pip install -r /code/requirements.txt
-ENV VERSION 1.4.0dev
-
-COPY dist/docker-compose-$VERSION.tar.gz /code/docker-compose/
-RUN pip install /code/docker-compose/docker-compose-$VERSION/
+ADD dist/docker-compose-release.tar.gz /code/docker-compose
+RUN pip install /code/docker-compose/docker-compose-*
ENTRYPOINT ["/usr/bin/docker-compose"]
diff --git a/docs/install.md b/docs/install.md
index fd7b3cab..be6a6b26 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -68,7 +68,7 @@ To install Compose, do the following:
Compose can also be run inside a container, from a small bash script wrapper.
To install compose as a container run:
- $ curl -L https://github.com/docker/compose/releases/download/1.5.0/compose-run > /usr/local/bin/docker-compose
+ $ curl -L https://github.com/docker/compose/releases/download/1.5.0/run.sh > /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
diff --git a/project/RELEASE-PROCESS.md b/project/RELEASE-PROCESS.md
index 30a9805a..85bbaf29 100644
--- a/project/RELEASE-PROCESS.md
+++ b/project/RELEASE-PROCESS.md
@@ -80,7 +80,7 @@ When prompted build the non-linux binaries and test them.
...release notes go here...
-5. Attach the binaries.
+5. Attach the binaries and `script/run.sh`
6. If everything looks good, it's time to push the release.
diff --git a/script/build-image b/script/build-image
new file mode 100755
index 00000000..d9faddc7
--- /dev/null
+++ b/script/build-image
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+if [ -z "$1" ]; then
+ >&2 echo "First argument must be image tag."
+ exit 1
+fi
+
+TAG=$1
+VERSION="$(python setup.py --version)"
+
+python setup.py sdist
+cp dist/docker-compose-$VERSION.tar.gz dist/docker-compose-release.tar.gz
+docker build -t docker/compose:$TAG -f Dockerfile.run .
+
diff --git a/script/release/build-binaries b/script/release/build-binaries
index 9f65b45d..083f8eb5 100755
--- a/script/release/build-binaries
+++ b/script/release/build-binaries
@@ -5,6 +5,19 @@
. "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
+function usage() {
+ >&2 cat << EOM
+Build binaries for the release.
+
+This script requires that 'git config branch.${BRANCH}.release' is set to the
+release version for the release branch.
+
+EOM
+ exit 1
+}
+
+BRANCH="$(git rev-parse --abbrev-ref HEAD)"
+VERSION="$(git config "branch.${BRANCH}.release")" || usage
REPO=docker/compose
# Build the binaries
@@ -16,6 +29,9 @@ script/build-linux
# TODO: build or fetch the windows binary
echo "You need to build the osx/windows binaries, that step is not automated yet."
+echo "Building the container distribution"
+script/build-image $VERSION
+
echo "Create a github release"
# TODO: script more of this https://developer.github.com/v3/repos/releases/
browser https://github.com/$REPO/releases/new
diff --git a/script/release/push-release b/script/release/push-release
index 7c448666..039436da 100755
--- a/script/release/push-release
+++ b/script/release/push-release
@@ -46,6 +46,9 @@ git push $GITHUB_REPO $VERSION
echo "Uploading sdist to pypi"
python setup.py sdist
+echo "Uploading the docker image"
+docker push docker/compose:$VERSION
+
if [ "$(command -v twine 2> /dev/null)" ]; then
twine upload ./dist/docker-compose-${VERSION}.tar.gz
else
diff --git a/script/run b/script/run.sh
index 64718efd..64718efd 100755
--- a/script/run
+++ b/script/run.sh