mirror of https://github.com/docker/docs.git
Merge pull request #70 from bfirsh/add-release-script
Add release script
This commit is contained in:
commit
b1a5e12b51
|
@ -1,5 +1,6 @@
|
|||
FROM golang:1.3-cross
|
||||
RUN go get github.com/mitchellh/gox
|
||||
RUN go get github.com/aktau/github-release
|
||||
ENV GOPATH /go/src/github.com/docker/machine/Godeps/_workspace:/go
|
||||
WORKDIR /go/src/github.com/docker/machine
|
||||
ADD . /go/src/github.com/docker/machine
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
rm -f machine_*
|
||||
docker build -t docker-machine .
|
||||
exec docker run --rm -v `pwd`:/go/src/github.com/docker/machine docker-machine gox -os="darwin linux windows"
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
if [ -z "$1" ]; then
|
||||
echo "Pass the version number as the first arg. E.g.: script/release 1.2.3"
|
||||
exit 1
|
||||
fi
|
||||
VERSION=$1
|
||||
if [ -z "$GITHUB_TOKEN" ]; then
|
||||
echo "GITHUB_TOKEN must be set for github-release"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
script/build
|
||||
git tag $VERSION
|
||||
git push --tags
|
||||
docker run --rm -e GITHUB_TOKEN docker-machine github-release release \
|
||||
--user docker \
|
||||
--repo machine \
|
||||
--tag $VERSION \
|
||||
--name $VERSION \
|
||||
--description "" \
|
||||
--pre-release \
|
||||
for BINARY in machine_*; do
|
||||
docker run --rm -e GITHUB_TOKEN -v `pwd`:/go/src/github.com/docker/machine \
|
||||
docker-machine github-release upload \
|
||||
--user docker \
|
||||
--repo machine \
|
||||
--tag $VERSION \
|
||||
--name $BINARY \
|
||||
--file $BINARY
|
||||
done
|
||||
|
Loading…
Reference in New Issue