|
|
@ -15,7 +15,9 @@ docker-image:
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: build-alpine
|
|
|
|
.PHONY: build-alpine
|
|
|
|
build-alpine:
|
|
|
|
build-alpine:
|
|
|
|
CGO_ENABLED=0 GOOS=linux go build -ldflags="buildmode=exe $(LDFLAGS) -linkmode external -w -extldflags '-static'" -o $(DISTDIR)/$(NAME)-$(VERSION)-alpine/obp cmd/obp/*.go
|
|
|
|
# this version breaks build variable injection
|
|
|
|
|
|
|
|
# CGO_ENABLED=0 GOOS=linux go build -ldflags="buildmode=exe $(LDFLAGS) -linkmode external -w -extldflags '-static' " -o $(DISTDIR)/$(NAME)-$(VERSION)-alpine/obp cmd/obp/*.go
|
|
|
|
|
|
|
|
CGO_ENABLED=0 GOOS=linux go build -ldflags="$(LDFLAGS)" -o $(DISTDIR)/$(NAME)-$(VERSION)-alpine/obp cmd/obp/*.go
|
|
|
|
|
|
|
|
|
|
|
|
# This file is intended as a starting point for a customized makefile for a Go project.
|
|
|
|
# This file is intended as a starting point for a customized makefile for a Go project.
|
|
|
|
#
|
|
|
|
#
|
|
|
@ -92,7 +94,7 @@ GOCMD = go
|
|
|
|
ARCHES ?= amd64 386
|
|
|
|
ARCHES ?= amd64 386
|
|
|
|
OSES ?= windows linux darwin
|
|
|
|
OSES ?= windows linux darwin
|
|
|
|
OUTTPL = $(DISTDIR)/$(NAME)-$(VERSION)-{{.OS}}_{{.Arch}}/{{.Dir}}
|
|
|
|
OUTTPL = $(DISTDIR)/$(NAME)-$(VERSION)-{{.OS}}_{{.Arch}}/{{.Dir}}
|
|
|
|
LDFLAGS = -X '$(PKG).Version=$(VERSION)' -X '$(PKG).Build=$(COMMIT_ID)'
|
|
|
|
LDFLAGS = -X $(PKG).Version=$(VERSION) -X $(PKG).Build=$(COMMIT_ID)
|
|
|
|
GOBUILD = gox -osarch="!darwin/386" -rebuild -gocmd="$(GOCMD)" -arch="$(ARCHES)" -os="$(OSES)" -output="$(OUTTPL)" -tags "$(BUILD_TAGS)" -ldflags "$(LDFLAGS)"
|
|
|
|
GOBUILD = gox -osarch="!darwin/386" -rebuild -gocmd="$(GOCMD)" -arch="$(ARCHES)" -os="$(OSES)" -output="$(OUTTPL)" -tags "$(BUILD_TAGS)" -ldflags "$(LDFLAGS)"
|
|
|
|
GOCLEAN = $(GOCMD) clean
|
|
|
|
GOCLEAN = $(GOCMD) clean
|
|
|
|
GOINSTALL = $(GOCMD) install -a -tags "$(BUILD_TAGS)" -ldflags "$(LDFLAGS)"
|
|
|
|
GOINSTALL = $(GOCMD) install -a -tags "$(BUILD_TAGS)" -ldflags "$(LDFLAGS)"
|
|
|
|