|
|
@ -5,12 +5,17 @@ docker: docker-image docker-push
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: docker-push
|
|
|
|
.PHONY: docker-push
|
|
|
|
docker-push:
|
|
|
|
docker-push:
|
|
|
|
|
|
|
|
$(DOCKER_CMD) pull code.ndumas.com/ndumas/obsidian-pipeline:$(VERSION)
|
|
|
|
|
|
|
|
$(DOCKER_CMD) tag code.ndumas.com/ndumas/obsidian-pipeline:$(VERSION) code.ndumas.com/ndumas/obsidian-pipeline:latest
|
|
|
|
$(DOCKER_CMD) push code.ndumas.com/ndumas/obsidian-pipeline:latest
|
|
|
|
$(DOCKER_CMD) push code.ndumas.com/ndumas/obsidian-pipeline:latest
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: docker-image
|
|
|
|
.PHONY: docker-image
|
|
|
|
docker-image:
|
|
|
|
docker-image:
|
|
|
|
$(DOCKER_CMD) build -t code.ndumas.com/ndumas/obsidian-pipeline:latest .
|
|
|
|
$(DOCKER_CMD) build --build-arg VERSION=$(VERSION) -t code.ndumas.com/ndumas/obsidian-pipeline:$(VERSION) .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONE: build-alpine
|
|
|
|
|
|
|
|
build-alpine:
|
|
|
|
|
|
|
|
CGO_ENABLED=0 go build -a -installsuffix cgo -o $(DISTDIR)/$(NAME)-$(VERSION)-alpine_amd64/obp cmd/obp/cmd/*.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.
|
|
|
|
#
|
|
|
|
#
|
|
|
@ -86,8 +91,7 @@ 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 -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)"
|
|
|
|
GOBUILD_SIMPLE = go build -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)"
|
|
|
|
GOTEST = $(GOCMD) test -v -tags "$(BUILD_TAGS)"
|
|
|
|
GOTEST = $(GOCMD) test -v -tags "$(BUILD_TAGS)"
|
|
|
|