summaryrefslogtreecommitdiff
path: root/script/release/build-binaries
blob: a39b186d97b4f78c6455e0753a25c93ac8687446 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
#
# Build the release binaries
#

. "$(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
script/clean
script/build/linux

echo "Building the container distribution"
script/build/image $VERSION

echo "Building the compose-tests image"
script/build/test-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

echo "Don't forget to download the osx and windows binaries from appveyor/bintray\!"
echo "https://dl.bintray.com/docker-compose/$BRANCH/"
echo "https://ci.appveyor.com/project/docker/compose"
echo