-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (29 loc) · 880 Bytes
/
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
-include .env
proto:
@echo "==> Making proto ..."
protoc proto/*.proto --go_out=plugins=grpc:.
start: install
go-congress serve
install:
go install -v ./...
install-go-deps:
go get -u github.com/PuerkitoBio/goquery
go get -u github.com/araddon/dateparse
go get -u github.com/spf13/cobra
install-deps: install-migrate install-go-deps
install-migrate:
@echo "==> Installing mattes/migrate ..."
go get -u -d github.com/mattes/migrate/cli github.com/lib/pq
go build -tags 'postgres' -o /usr/local/bin/migrate github.com/mattes/migrate/cli
new: reset start
reset: reset-db
@echo "==> Resetting ..."
reset-db:
@echo "==> Resetting database ..."
-dropdb $(DB_NAME)
createdb $(DB_NAME)
#-migrate -path _migrations -database $(POSTGRES_URL) down
migrate -path _migrations -database $(POSTGRES_URL) up
test:
go test -v ./...
.PHONY: install test create-db proto