-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
47 lines (37 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
.PHONY: install_deps
install_deps:
go get github.com/pressly/goose
go mod tidy
.PHONY: migration_status
migration_status:
goose -dir ./pkg/database/migrations postgres "host=127.0.0.1 port=5432 user=postgres password=Qwerty123 dbname=bot sslmode=disable" status
.PHONY: migration_up
migration_up:
goose -dir ./pkg/database/migrations postgres "host=127.0.0.1 port=5432 user=postgres password=Qwerty123 dbname=bot sslmode=disable" up
.PHONY: migration_down
migration_down:
goose -dir ./pkg/database/migrations postgres "host=127.0.0.1 port=5432 user=postgres password=Qwerty123 dbname=bot sslmode=disable" reset
.PHONY: run
run:
docker-compose -f deploy/docker-compose.yml -p webhook_bot up -d
.PHONY: build_run
build_run:
make docker_build
make run
.PHONY: stop
stop:
docker-compose -f deploy/docker-compose.yml -p webhook_bot down
.PHONY: test
test:
go test -v ./...
.PHONY: coverage
coverage:
go test -v ./... -coverprofile=coverage.out
go tool cover -func ./coverage.out
go tool cover -html ./coverage.out
.PHONY: lint
lint:
golangci-lint run
.PHONY: docker_build
docker_build:
docker build -f deploy/Dockerfile -t webhook-bot:0.1.0 .