From 77fb940fb89e8a8ed0c3859af2500d1ec76eca73 Mon Sep 17 00:00:00 2001 From: Bill Robinson Date: Fri, 19 May 2017 13:48:53 -0700 Subject: [PATCH] scripts/release.sh: Reconciled "github-release must be installed" error with the attempt to auto-install it later in the file Signed-off-by: Bill Robinson --- scripts/release.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index fdf3fe8..52625e8 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -8,10 +8,9 @@ cd -P -- "$(dirname -- "$0")" +# Install github-release binary if not present if [ -z "$(which github-release)" ]; then - echo "Please install github-release before running this script" - echo "You may download a release from https://github.com/aktau/github-release/releases or run 'go get github.com/aktau/github-release' if you have Go installed" - exit 1 + go get -u github.com/aktau/github-release || exit 1 fi if [ -z "$BUILD_VERSION" ]; then @@ -44,9 +43,6 @@ else changelog="don't forget to update the changelog" fi -# Install github-release binary if not present -[ -n "$(which github-release)" ] || go get -u github.com/aktau/github-release || exit 1 - TAR_FILENAME="contiv-"${BUILD_VERSION}".tgz" TAR_FILENAME2="contiv-full-"${BUILD_VERSION}".tgz" TAR_FILE="../release/contiv-"${BUILD_VERSION}".tgz"