Skip to content

Commit

Permalink
fixup the linux make target label
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorVin committed Feb 20, 2024
1 parent f77fb90 commit 06bb934
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,8 @@ gen-store-mock:
go install github.com/golang/mock/[email protected]
mockgen -package=mock -source=internal/store/interface.go > internal/store/mock/mock.go

## build osx bin
build-osx:
ifeq ($(GO_VERSION), 0)
$(error build requies go version 1.17.n or higher)
endif
GOOS=darwin GOARCH=amd64 go build -o bomservice \
-ldflags \
"-X $(LDFLAG_LOCATION).GitCommit=$(GIT_COMMIT) \
-X $(LDFLAG_LOCATION).GitBranch=$(GIT_BRANCH) \
-X $(LDFLAG_LOCATION).GitSummary=$(GIT_SUMMARY) \
-X $(LDFLAG_LOCATION).AppVersion=$(VERSION) \
-X $(LDFLAG_LOCATION).BuildDate=$(BUILD_DATE)"



## Build linux bin
build-linux:
build:
ifeq ($(GO_VERSION), 0)
$(error build requies go version 1.20.x+ or higher)
endif
Expand All @@ -56,7 +41,7 @@ endif


## build docker image and tag as ghcr.io/metal-toolbox/bomservice:latest
build-image: build-linux
build-image: build
@echo ">>>> NOTE: You may want to execute 'make build-image-nocache' depending on the Docker stages changed"
docker build --rm=true -f Dockerfile -t ${DOCKER_IMAGE}:latest . \
--label org.label-schema.schema-version=1.0 \
Expand Down

0 comments on commit 06bb934

Please sign in to comment.