-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (30 loc) · 1.51 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
TARGET_ENGINE = engine
TARGET_WORKER = worker
TARGET_CDSCTL = cdsctl
doc:
ifndef GEN_PATH
$(error GEN_PATH is undefined)
endif
# export GEN_PATH=$HOME/src/github.com/ovh/cds/docs/content/docs/components
$(TARGET_CDSCTL) doc $(GEN_PATH)
$(TARGET_WORKER) doc $(GEN_PATH)
$(TARGET_ENGINE) doc $(GEN_PATH) ./
cd docs && ./build.sh
modclean:
@echo "removing vendor directory... " && rm -rf vendor
@echo "cleaning modcache... " && GO111MODULE=off go clean -modcache || true
mod:
@echo "running go mod tidy... " && GO111MODULE=on go mod tidy
@echo "running go mod vendor..." && GO111MODULE=on go mod vendor
@echo "doing some clean in vendor directory..." && find vendor -type f ! \( -name 'modules.txt' -o -name '*.sum' -o -name '*.mod' -o -name '*.rst' -o -name '*.go' -o -name '*.y' -o -name '*.h' -o -name '*.c' -o -name '*.proto' -o -name '*.tmpl' -o -name '*.s' -o -name '*.pl' \) -exec rm {} \;
# two calls to RegisterManifestSchema(ocispec.MediaTypeImageIndex -> panic
# file oci.go is in conflict with file /vendor/github.com/docker/distribution/manifest/manifestlist/manifestlist.go
# when docker update their vendor, it will be possible to remove this line.
# this will fix the plugin-clair for the moment
@echo "removing file /vendor/github.com/docker/docker/distribution/oci.go..." && rm -f vendor/github.com/docker/docker/distribution/oci.go
@echo "removing subpackages vendors" && rm -rf vendor/github.com/ovh/cds
install:
go install $$(go list ./...)
build:
$(MAKE) build -C engine
$(MAKE) build -C cli/cdsctl