-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (37 loc) · 1.02 KB
/
Copy pathMakefile
File metadata and controls
48 lines (37 loc) · 1.02 KB
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
build:
go build -o bin/goscaf ./main.go
install:
go install ./...
run:
go run ./main.go
test:
GOTOOLCHAIN=auto go test -race -cover ./...
lint:
golangci-lint run ./...
tidy:
go mod tidy
smoke-test: build
./bin/goscaf init smoke-test-project --defaults
ls smoke-test-project/
cd smoke-test-project/ && ../bin/goscaf add new_svc
rm -rf smoke-test-project/
./bin/goscaf init smoke-swagger-project --framework gin --swagger
cd smoke-swagger-project/ && make swagger
rm -rf smoke-swagger-project/
@echo "Smoke test passed!"
./bin/goscaf init smoke-test-db --db postgres --defaults
ls smoke-test-db/pkg/db/db.go
rm -rf smoke-test-db/
@echo "Smoke tests passed!"
fmt:
go fmt ./...
clean:
rm -rf bin/
rm -rf coverage.out
rm -rf smoke-test-project/
rm -rf smoke-swagger-project/
rm -rf smoke-test-db/
install-tools:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install golang.org/x/tools/cmd/goimports@latest
.PHONY: build install run test lint tidy smoke-test fmt clean install-tools