forked from thanos-io/thanos
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile.rhtap
More file actions
23 lines (21 loc) · 831 Bytes
/
Makefile.rhtap
File metadata and controls
23 lines (21 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
include Makefile
# Override build, crossbuild targets from Makefile
# to use promu to build dynamic binaries
.PHONY: build
build: ## Builds Thanos binary using `promu`.
build: check-git deps $(PROMU)
@echo ">> building Thanos binary in $(PREFIX)"
@go mod vendor && $(PROMU) -c ".promu.prow.yaml" build -v --cgo --prefix $(PREFIX)
GIT_BRANCH=$(shell $(GIT) rev-parse --abbrev-ref HEAD)
.PHONY: crossbuild
crossbuild: ## Builds all binaries for all platforms.
ifeq ($(GIT_BRANCH), main)
crossbuild: | $(PROMU)
@echo ">> crossbuilding all binaries"
# we only care about below two for the main branch
@go mod vendor && $(PROMU) -c ".promu.prow.yaml" crossbuild -v --cgo -p linux/amd64
else
crossbuild: | $(PROMU)
@echo ">> crossbuilding all binaries"
@go mod vendor && $(PROMU) -c ".promu.prow.yaml" crossbuild -v --cgo
endif