Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

be specific about the platform #32

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading