From 04e97f599aeafa939b55a9c81a7714335bd0596b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Husiaty=C5=84ski?= Date: Sun, 6 Jan 2019 09:40:15 +0100 Subject: [PATCH] fix build scripts (#3085) * fix build scripts Search for the right variable when introspecting Go code. `Version` was renamed to `TMCoreSemVer`. This is regression introduced in b95ac688af14d130e6ad0b580ed9a8181f6c487c * fix all `Version` introspections. Use `TMCoreSemVer` instead of `Version` --- DOCKER/build.sh | 2 +- DOCKER/push.sh | 2 +- scripts/dist.sh | 2 +- scripts/publish.sh | 2 +- scripts/release.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DOCKER/build.sh b/DOCKER/build.sh index ee617cc63..2aa42a6cd 100755 --- a/DOCKER/build.sh +++ b/DOCKER/build.sh @@ -3,7 +3,7 @@ set -e # Get the tag from the version, or try to figure it out. if [ -z "$TAG" ]; then - TAG=$(awk -F\" '/Version =/ { print $2; exit }' < ../version/version.go) + TAG=$(awk -F\" '/TMCoreSemVer =/ { print $2; exit }' < ../version/version.go) fi if [ -z "$TAG" ]; then echo "Please specify a tag." diff --git a/DOCKER/push.sh b/DOCKER/push.sh index 32741dce8..f228406d4 100755 --- a/DOCKER/push.sh +++ b/DOCKER/push.sh @@ -3,7 +3,7 @@ set -e # Get the tag from the version, or try to figure it out. if [ -z "$TAG" ]; then - TAG=$(awk -F\" '/Version =/ { print $2; exit }' < ../version/version.go) + TAG=$(awk -F\" '/TMCoreSemVer =/ { print $2; exit }' < ../version/version.go) fi if [ -z "$TAG" ]; then echo "Please specify a tag." diff --git a/scripts/dist.sh b/scripts/dist.sh index 40aa71e98..f999c5376 100755 --- a/scripts/dist.sh +++ b/scripts/dist.sh @@ -6,7 +6,7 @@ set -e # Get the version from the environment, or try to figure it out. if [ -z $VERSION ]; then - VERSION=$(awk -F\" '/Version =/ { print $2; exit }' < version/version.go) + VERSION=$(awk -F\" 'TMCoreSemVer =/ { print $2; exit }' < version/version.go) fi if [ -z "$VERSION" ]; then echo "Please specify a version." diff --git a/scripts/publish.sh b/scripts/publish.sh index ba9440878..7da299aaf 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -6,7 +6,7 @@ DIST_DIR=./build/dist # Get the version from the environment, or try to figure it out. if [ -z $VERSION ]; then - VERSION=$(awk -F\" '/Version =/ { print $2; exit }' < version/version.go) + VERSION=$(awk -F\" 'TMCoreSemVer =/ { print $2; exit }' < version/version.go) fi if [ -z "$VERSION" ]; then echo "Please specify a version." diff --git a/scripts/release.sh b/scripts/release.sh index 9a4e508e1..8c40d36b6 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -3,7 +3,7 @@ set -e # Get the version from the environment, or try to figure it out. if [ -z $VERSION ]; then - VERSION=$(awk -F\" '/Version =/ { print $2; exit }' < version/version.go) + VERSION=$(awk -F\" 'TMCoreSemVer =/ { print $2; exit }' < version/version.go) fi if [ -z "$VERSION" ]; then echo "Please specify a version."