-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
115 lines (77 loc) · 3.6 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.PHONY: build
tools:
bash ./scripts/tools.sh
generate-model:
./scripts/generate-model.sh
generate-appsproxy-api:
SERVICE_NAME=appsproxy bash ./scripts/generate-api.sh
generate-templates-api:
SERVICE_NAME=templates bash ./scripts/generate-api.sh
generate-stream-api:
SERVICE_NAME=stream bash ./scripts/generate-api.sh
build:
GORELEASER_CURRENT_TAG=0.0.1-dev goreleaser build --clean --snapshot -f ./build/ci/goreleaser.yml
build-local:
GORELEASER_CURRENT_TAG=0.0.1-dev goreleaser build --single-target --clean --snapshot -f ./build/ci/goreleaser.yml
release:
goreleaser release --clean -f ./build/ci/goreleaser.yml
release-local:
goreleaser release --clean --snapshot --skip=publish -f ./build/ci/goreleaser.yml
build-templates-api:
CGO_ENABLED=0 go build -v -mod mod -ldflags "-s -w" -o "$(or $(BUILD_TARGET_PATH), ./target/templates/api)" ./cmd/templates-api
run-templates-api:
air -c ./provisioning/templates-api/dev/.air-api.toml
build-stream-service:
CGO_ENABLED=0 go build -v -mod mod -ldflags "-s -w" -o "$(or $(BUILD_TARGET_PATH), ./target/stream/service)" ./cmd/stream
run-stream-service:
rm -rf /tmp/stream-volumes && \
mkdir -p /tmp/stream-volumes/hdd/my-volume && \
air -c ./provisioning/stream/dev/.air.toml
run-stream-service-once: build-stream-service
./target/stream/service api http-source storage-writer storage-reader storage-coordinator
build-apps-proxy:
CGO_ENABLED=0 go build -v -mod mod -ldflags "-s -w" -o "$(or $(BUILD_TARGET_PATH), ./target/apps-proxy/proxy)" ./cmd/apps-proxy
run-apps-proxy:
air -c ./provisioning/apps-proxy/dev/.air.toml
tests:
TEST_PACKAGE=./... bash ./scripts/tests.sh
tests-verbose:
TEST_VERBOSE=true TEST_LOG_FORMAT=standard-verbose TEST_PACKAGE=./... bash ./scripts/tests.sh
tests-unit:
TEST_PACKAGE=./internal/pkg/... bash ./scripts/tests.sh
tests-unit-verbose:
TEST_VERBOSE=true TEST_LOG_FORMAT=standard-verbose TEST_PARALLELISM=1 TEST_PARALLELISM_PKG=1 TEST_PACKAGE=./internal/pkg... bash ./scripts/tests.sh
tests-cli:
TEST_PACKAGE=./test/cli/... bash ./scripts/tests.sh
tests-cli-verbose:
TEST_VERBOSE=true TEST_LOG_FORMAT=standard-verbose TEST_PARALLELISM=1 TEST_PARALLELISM_PKG=1 TEST_PACKAGE=./test/cli/... bash ./scripts/tests.sh
tests-templates-api:
TEST_PACKAGE=./test/templates/api/... bash ./scripts/tests.sh
tests-templates-api-verbose:
TEST_VERBOSE=true TEST_LOG_FORMAT=standard-verbose TEST_PARALLELISM=1 TEST_PARALLELISM_PKG=1 TEST_PACKAGE=./test/api/templates/... bash ./scripts/tests.sh
tests-stream-service:
TEST_PACKAGE=./test/stream/... bash ./scripts/tests.sh
tests-stream-service-verbose:
TEST_VERBOSE=true TEST_LOG_FORMAT=standard-verbose TEST_PARALLELISM=1 TEST_PARALLELISM_PKG=1 TEST_PACKAGE=./test/stream/... bash ./scripts/tests.sh
tests-stream-api:
TEST_PACKAGE=./test/stream/api/... bash ./scripts/tests.sh
tests-stream-api-verbose:
TEST_VERBOSE=true TEST_LOG_FORMAT=standard-verbose TEST_PARALLELISM=1 TEST_PARALLELISM_PKG=1 TEST_PACKAGE=./test/stream/api/... bash ./scripts/tests.sh
tests-stream-worker:
TEST_PACKAGE=./test/stream/worker/... bash ./scripts/tests.sh
tests-stream-worker-verbose:
TEST_VERBOSE=true TEST_LOG_FORMAT=standard-verbose TEST_PARALLELISM=1 TEST_PARALLELISM_PKG=1 TEST_PACKAGE=./test/stream/worker/... bash ./scripts/tests.sh
mod:
bash ./scripts/mod.sh
lint:
bash ./scripts/lint.sh
lint-all:
bash ./scripts/lint.sh --max-issues-per-linter=0 --max-same-issues=0
fix:
bash ./scripts/fix.sh
ci: mod lint tests
godoc:
# Example url: http://localhost:6060/pkg/github.com/keboola/keboola-as-code/?m=all
godoc -http=0.0.0.0:6060
check-licenses:
go-licenses check ./... --disallowed_types forbidden,restricted