-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 827 Bytes
/
Makefile
File metadata and controls
37 lines (29 loc) · 827 Bytes
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
.PHONY: build
build:
go build -ldflags="-s -w" -o bin/cve main/cve/main.go
.PHONY: debug
debug:
go build -gcflags '-N -l' -o bin/cve main/cve/main.go
.PHONY: lint
lint:
./bin/golangci-lint run ./...
.PHONY: lint-prepare
lint-prepare:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s latest
.PHONY: test
test:
go test -v -short ./...
.PHONY: migrate-prepare
migrate-prepare:
go get -u github.com/pressly/goose/cmd/goose
mkdir "./migrations"
.PHONY: migrate-run
migrate-run:
#goose --dir="migrations" postgres "postgres://pg-user:pg-pass@127.0.0.1:5432/pg-db?sslmode=disable" down && \
goose --dir="migrations" postgres "postgres://pg-user:pg-pass@127.0.0.1:5432/pg-db?sslmode=disable" up
.PHONY: run
run:
docker-compose up -d
.PHONY: stop
stop:
docker-compose down