From 9067e952f2d4e1c690a6eb39f262ecde5c76815e Mon Sep 17 00:00:00 2001 From: slaventius Date: Wed, 15 Feb 2023 08:37:12 +0300 Subject: [PATCH] * --- build/Makefile | 6 +++--- scripts/start.sh | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/build/Makefile b/build/Makefile index 53b1e0e..146d2dc 100644 --- a/build/Makefile +++ b/build/Makefile @@ -1,7 +1,7 @@ .DEFAULT_GOAL := build -GOOS=linux -GOARCH=amd64 +GOOS=$(shell go env GOOS) +GOARCH=$(shell go env GOARCH) GOBIN=$(shell go env GOPATH)/bin APP=authService APP_BINARY=${GOBIN}/${APP}-${GOOS}-${GOARCH} @@ -10,7 +10,7 @@ APP_TAG=slaventius/test3k_auth:latest clean: @echo "cleaning ${APP_BINARY}" @go clean - @rm ${APP_BINARY} + @rm -f ${APP_BINARY} build: clean @echo "building ${APP_BINARY}" diff --git a/scripts/start.sh b/scripts/start.sh index f7e43a9..1f0467e 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -5,4 +5,9 @@ export DB_PORT=9995 export APP_PORT=9994 export SENTRY_DSN="https://3f4b31dbbd9a4a6b8a71f9881d962f25@o4504654569799680.ingest.sentry.io/4504654572683264" -./authService \ No newline at end of file +export GOOS=$(eval go env GOOS) +export GOARCH=$(eval go env GOARCH) +export GOBIN=$(eval go env GOPATH)/bin +export APPBINARY=${GOBIN}/authService-${GOOS}-${GOARCH} + +${APPBINARY} \ No newline at end of file