forked from cdnjs/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 911 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
GO_BUILD_ARGS = -mod=readonly -v -ldflags="-s -w"
.PHONY: all
all: algolia checker packages autoupdate kv
.PHONY: algolia
algolia:
go build $(GO_BUILD_ARGS) -o bin/algolia ./cmd/algolia
.PHONY: checker
checker:
go build $(GO_BUILD_ARGS) -o bin/checker ./cmd/checker
.PHONY: packages
packages:
go build $(GO_BUILD_ARGS) -o bin/packages ./cmd/packages
.PHONY: autoupdate
autoupdate:
go build $(GO_BUILD_ARGS) -o bin/autoupdate ./cmd/autoupdate
.PHONY: kv
kv:
go build $(GO_BUILD_ARGS) -o bin/kv ./cmd/kv
.PHONY: schema
schema:
./bin/packages human > schema_human.json
./bin/packages non-human > schema_non_human.json
.PHONY: clean
clean:
rm -rfv bin/*
.PHONY: test
test: clean checker
go test -v ./test/...
.PHONY: lint
lint:
go get -u golang.org/x/lint/golint
$(GOPATH)/bin/golint ./...
.PHONY: dev
dev: autoupdate
docker build -t cdnjs-dev -f ./dev/Dockerfile .
docker run -it cdnjs-dev