-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
42 lines (26 loc) · 1.04 KB
/
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
33
34
35
36
37
38
39
40
41
42
BASE_BRANCH ?= devel
export BASE_BRANCH
ifneq (,$(DAPPER_HOST_ARCH))
# Running in Dapper
include $(SHIPYARD_DIR)/Makefile.inc
# Generated files
GO ?= go
MOCKGEN := $(CURDIR)/bin/mockery
$(MOCKGEN):
mkdir -p $(@D) && $(GO) -C tools build -o $@ github.com/vektra/mockery/v2
pkg/aws/client/fake/client.go: pkg/aws/client/client.go pkg/aws/client/.mockery.yaml | $(MOCKGEN)
PATH=$(dir $(MOCKGEN)):$$PATH $(GO) -C $(<D) generate
pkg/gcp/client/fake/client.go: pkg/gcp/client/client.go pkg/gcp/client/.mockery.yaml | $(MOCKGEN)
PATH=$(dir $(MOCKGEN)):$$PATH $(GO) -C $(<D) generate
pkg/ocp/fake/machineset.go: pkg/ocp/machinesets.go pkg/ocp/.mockery.yaml | $(MOCKGEN)
PATH=$(dir $(MOCKGEN)):$$PATH $(GO) -C $(<D) generate
unit: pkg/aws/client/fake/client.go pkg/gcp/client/fake/client.go pkg/ocp/fake/machineset.go
else
# Not running in Dapper
Makefile.dapper:
@echo Downloading $@
@curl -sfLO https://raw.githubusercontent.com/submariner-io/shipyard/$(BASE_BRANCH)/$@
include Makefile.dapper
endif
# Disable rebuilding Makefile
Makefile Makefile.inc: ;