Skip to content

Commit

Permalink
be specific about the platform (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorVin authored Nov 5, 2024
1 parent 915e795 commit 3ad6e7e
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ REPO := "https://github.com/metal-toolbox/bioscfg.git"
.DEFAULT_GOAL := help

## lint
lint: gen-mock
lint:
golangci-lint run --config .golangci.yml --fix

## Go test
Expand All @@ -27,19 +27,6 @@ gen-mock:
go generate ./...
go mod tidy

## build-osx
build-osx:
ifeq ($(GO_VERSION), 0)
$(error build requies go version 1.22 or higher)
endif
CGO_ENABLED=0 go build -o bioscfg \
-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:
ifeq ($(GO_VERSION), 0)
Expand All @@ -56,7 +43,7 @@ endif
## build docker image and tag as ghcr.io/metal-toolbox/bioscfg:latest
build-image: build-linux
@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 . \
docker buildx build --platform linux/amd64 --rm=true -f Dockerfile -t ${DOCKER_IMAGE}:latest . \
--label org.label-schema.schema-version=1.0 \
--label org.label-schema.vcs-ref=$(GIT_COMMIT_FULL) \
--label org.label-schema.vcs-url=$(REPO)
Expand Down

0 comments on commit 3ad6e7e

Please sign in to comment.