forked from quay/quay-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (24 loc) · 938 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.PHONY: vendor test bin/quay-builder
PROJECT ?= quay-builder
ORG_PATH ?= github.com/quay
REPO_PATH ?= $(ORG_PATH)/$(PROJECT)
IMAGE ?= quay.io/projectquay/$(PROJECT)
VERSION ?= $(shell ./scripts/git-version)
LD_FLAGS ?= "-w -X $(REPO_PATH)/version.Version=$(VERSION)"
IMAGE_TAG ?= latest
SUBSCRIPTION_KEY ?= subscription.pem
BUILD_TAGS ?= 'btrfs_noversion exclude_graphdriver_btrfs exclude_graphdriver_devicemapper containers_image_openpgp'
BUILDER_SRC ?= 'github.com/quay/quay-builder'
all: vendor test build
vendor:
@go mod vendor
test: vendor
@go vet ./...
@go test -v ./...
build: bin/quay-builder
bin/quay-builder:
CGO_ENABLED=0 go build -ldflags $(LD_FLAGS) -o bin/quay-builder -tags $(BUILD_TAGS) $(REPO_PATH)/cmd/quay-builder
install:
go install -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/quay-builder
build-ubi8:
docker build --build-arg=BUILDER_SRC=$(BUILDER_SRC) -f Dockerfile -t $(IMAGE):$(IMAGE_TAG)-ubi8 .