Skip to content

Commit

Permalink
update Makefile to give better warning
Browse files Browse the repository at this point in the history
  • Loading branch information
pkieltyka committed May 7, 2024
1 parent 6b96f8d commit 1050224
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ test-clean:
GOGC=off go clean -testcache

eif: clean ensure-version
mkdir -p bin
@mkdir -p bin
docker build --platform linux/amd64 --build-arg VERSION=$(VERSION) --build-arg ENV_ARG=$(ENV) -t waas-authenticator-builder .
docker run --platform linux/amd64 -v $(TOP)/bin:/out waas-authenticator-builder waas-auth.$(VERSION)

ensure-version:
test -n "$(VERSION)"
rm -rf version.go
echo "package waasauthenticator" > version.go
echo "const VERSION = \"$(VERSION)\"" >> version.go
@test -n "$(VERSION)" || (echo "Oops! you forgot to pass the VERSION env variable, try: make VERSION=vX.X.X eif" && exit 1)
@rm -rf version.go
@echo "package waasauthenticator" > version.go
@echo "const VERSION = \"$(VERSION)\"" >> version.go

0 comments on commit 1050224

Please sign in to comment.