From 17a27ae02ee688938bce44836be627b40c2ac38e Mon Sep 17 00:00:00 2001 From: Roland Swingler Date: Mon, 23 Apr 2018 16:30:41 +0100 Subject: [PATCH] Be more robust to goreleaser not being installed. --- README.md | 2 +- release.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 32108ae..7e989e0 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ $ go test ./... ## Release -In order to release a new version, set up github export GITHUB_TOKEN=[YOUR_TOKEN] +In order to release a new version, set up github export GITHUB_TOKEN=[YOUR_TOKEN]. Make sure that you have goreleaser installed from [goreleaser.com](http://goreleaser.com). Ensure your git repo is clean. Then update VERSION (no need to commit it, it will be committed automatically), and run: diff --git a/release.sh b/release.sh index f014fb3..ba50229 100755 --- a/release.sh +++ b/release.sh @@ -5,6 +5,7 @@ set -x die() { echo "$*" 1>&2 ; exit 1; } +which goreleaser || die "Install goreleaser from http://goreleaser.com" VERSION=`cat VERSION | tr -d '\n'` git diff-index --quiet --cached HEAD -- || die "Index dirty, commit first" go generate ./cli