diff --git a/.travis.yml b/.travis.yml index 3457bc3..7f3fdc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,3 @@ language: go go: - 1.4 - 1.5 - - tip diff --git a/simpleregistry/Makefile b/simpleregistry/Makefile index 2cc8590..124e413 100644 --- a/simpleregistry/Makefile +++ b/simpleregistry/Makefile @@ -9,5 +9,6 @@ darwin: docker: linux docker build -t binder/registry . -upload: docker +docker-upload: docker docker push binder/registry + diff --git a/simpleregistry/release.sh b/simpleregistry/release.sh new file mode 100755 index 0000000..8a4c17d --- /dev/null +++ b/simpleregistry/release.sh @@ -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 +