-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
56 lines (46 loc) · 1.06 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
# Build all targets.
all: tidy cli serve
@echo Built all targets...
# Build the CLI
cli:
@echo Building CLI...
go build -o ./target/gowarp-cli -ldflags "-s -w" ./cmd/cli/main.go
# Build the server
serve:
@echo Building server...
go build -o ./target/gowarp-serve -ldflags "-s -w" ./cmd/http/main.go
# Remove build artifacts
clean:
@echo Removing build artifacts...
rm -r ./target
# Run the cli application
run_cli: cli
@echo Starting CLI...
./target/gowarp-cli
# Start the server
run_serve: serve
@echo Starting the server...
./target/gowarp-serve
# Run go vet
vet:
@echo Running go vet...
go vet ./...
# Run go mod tidy
tidy:
@echo Running go mod tidy...
go mod tidy
# Run golangci-lint
lint:
@echo Running golangci-lint...
golangci-lint run ./...
# Run gofumpt on the project
fmt:
@echo Running gofumpt...
gofumpt -l -w .
# Install the prerequisites
pre: tidy
@echo Installing prerequisites...
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.1
go install mvdan.cc/gofumpt@latest
@echo Vendoring dependencies...
go mod vendor