Skip to content

Commit

Permalink
fix: issue where missing variables for make all were not being output…
Browse files Browse the repository at this point in the history
… correctly
  • Loading branch information
Vafilor committed Jan 7, 2021
1 parent 0a3a322 commit 805b929
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.PHONY: init

init:
ifndef version
$(error CLI version is undefined)
endif
Expand All @@ -11,11 +14,11 @@ ifndef core-ui-version-tag
$(error core-ui version tag is undefined)
endif

ldflags := "\
-X github.com/onepanelio/cli/config.CLIVersion=$(version)\
-X github.com/onepanelio/cli/config.ManifestsRepositoryTag=$(manifests-version-tag)\
-X github.com/onepanelio/cli/config.CoreImageTag=$(core-version-tag)\
-X github.com/onepanelio/cli/config.CoreUIImageTag=$(core-ui-version-tag)"
ldflags := "\
-X github.com/onepanelio/cli/config.CLIVersion=$(version)\
-X github.com/onepanelio/cli/config.ManifestsRepositoryTag=$(manifests-version-tag)\
-X github.com/onepanelio/cli/config.CoreImageTag=$(core-version-tag)\
-X github.com/onepanelio/cli/config.CoreUIImageTag=$(core-ui-version-tag)"

build-linux-amd64:
env GOOS=linux GOARCH=amd64 go build \
Expand All @@ -35,7 +38,7 @@ build-windows-amd64:
-ldflags $(ldflags) \
main.go

all-internal: build-linux-amd64 build-macos-amd64 build-windows-amd64
all-internal: init build-linux-amd64 build-macos-amd64 build-windows-amd64

all:
docker run --rm \
Expand Down

0 comments on commit 805b929

Please sign in to comment.