From 758d317d0ff70ce48fcc18843e40e938f0ad66df Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Fri, 19 Mar 2021 08:45:56 +0000 Subject: [PATCH] add platform spec to build path;echo version to console --- build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 4aa0677..8599c07 100755 --- a/build.sh +++ b/build.sh @@ -3,7 +3,6 @@ GOPATH=$HOME/go GOPATH=$GOPATH:$(pwd) export GOPATH -echo $GOPATH GIT_COMMIT=$(git rev-list -1 HEAD) export GIT_COMMIT @@ -12,7 +11,11 @@ export CANONICAL_VERSION VERSION_STRING="$CANONICAL_VERSION-$GIT_COMMIT" export VERSION_STRING +buildpath="build/$(uname)/gostations" + go mod vendor go mod tidy -go build -o build/gostations -ldflags "-X main.version=$VERSION_STRING" +go build -o "$buildpath" -ldflags "-X main.version=$VERSION_STRING" + +"$buildpath" -v \ No newline at end of file