-
-
Notifications
You must be signed in to change notification settings - Fork 373
/
Makefile
57 lines (46 loc) · 1.14 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
GO ?= go
# Build all files.
build:
@echo "==> Building"
@$(GO) generate ./...
.PHONY: build
# Install from source.
install:
@echo "==> Installing up ${GOPATH}/bin/up"
@$(GO) install ./...
.PHONY: install
# Run all tests.
test: internal/proxy/bin/bin_assets.go
@$(GO) test -timeout 2m ./... && echo "\n==>\033[32m Ok\033[m\n"
.PHONY: test
# Run all tests in CI.
test.ci: internal/proxy/bin/bin_assets.go
@$(GO) test -v -timeout 5m ./... && echo "\n==>\033[32m Ok\033[m\n"
.PHONY: test.ci
internal/proxy/bin/bin_assets.go:
@$(GO) generate ./...
# Show source statistics.
cloc:
@cloc -exclude-dir=vendor,node_modules .
.PHONY: cloc
# Release binaries to GitHub.
release: build
@echo "==> Releasing"
@goreleaser -p 1 --rm-dist --config .goreleaser.yml
@echo "==> Complete"
.PHONY: release
# Show to-do items per file.
todo:
@rg TODO:
.PHONY: todo
# Show size of imports.
size:
@curl -sL https://gist.githubusercontent.com/tj/04e0965e23da00ca33f101e5b2ed4ed4/raw/9aa16698b2bc606cf911219ea540972edef05c4b/gistfile1.txt | bash
.PHONY: size
# Clean.
clean:
@rm -fr \
dist \
internal/proxy/bin/bin_assets.go \
internal/shim/bindata.go
.PHONY: clean