From 390b4fd6d7cfe25f3e3c18264248df2ac704fae3 Mon Sep 17 00:00:00 2001 From: Antony Denyer Date: Tue, 12 Nov 2019 12:43:03 +0000 Subject: [PATCH] build: ensure version before deployment --- scripts/common.bash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/common.bash b/scripts/common.bash index 95fd54a..e791d1b 100755 --- a/scripts/common.bash +++ b/scripts/common.bash @@ -13,6 +13,10 @@ github_clone() { } ensure_version() { + if [[ -z "$VERSION" ]]; then + VERSION="${TRAVIS_BRANCH//release\/}" + fi + if [[ "$VERSION" = "" ]]; then echo "ERROR: Missing VERSION specify it using an env variable" exit 1