Skip to content

Commit

Permalink
Merge pull request #4 from binder-project/dockerization
Browse files Browse the repository at this point in the history
Release script
  • Loading branch information
rgbkrk committed Oct 7, 2015
2 parents 49d5ddd + fd71af0 commit 15e1b26
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ language: go
go:
- 1.4
- 1.5
- tip
3 changes: 2 additions & 1 deletion simpleregistry/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ darwin:
docker: linux
docker build -t binder/registry .

upload: docker
docker-upload: docker
docker push binder/registry

43 changes: 43 additions & 0 deletions simpleregistry/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash
set -euo pipefail

if [ ! -e "$( which github-release )" ]; then
echo "You need github-release installed."
echo "go get github.com/aktau/github-release"
exit 2
fi

declare -xr USER="binder-project"
declare -xr REPO="binder-registry"

TAG=${1:-}
NAME=${2:-}
DESCRIPTION="Prototypal release of the binder template registry"

make
make docker-upload

github-release release \
--user "$USER" \
--repo "$REPO" \
--tag "$TAG" \
--pre-release \
--name "$NAME" \
--description "$DESCRIPTION"

github-release upload \
--user "$USER" \
--repo "$REPO" \
--tag "$TAG" \
--name "linux-amd64-simpleregistry" \
--file bin/linux-amd64-simpleregistry

docker push

github-release upload \
--user "$USER" \
--repo "$REPO" \
--tag "$TAG" \
--name "darwin-amd64-simpleregistry" \
--file bin/darwin-amd64-simpleregistry

0 comments on commit 15e1b26

Please sign in to comment.