forked from dennis-tra/nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (24 loc) · 816 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
default: all
all: clean build
test:
go test ./...
build:
go build -o dist/nebula cmd/nebula/*
format:
gofumpt -w -l .
clean:
rm -r dist || true
docker:
docker build . -t wcgcyx/nebula-crawler:latest
tools:
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@v4.14.1
go install github.com/volatiletech/sqlboiler/v4@v4.6.0
go install github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-psql@v4.6.0
db-reset: migrate-down migrate-up models
models:
sqlboiler psql
migrate-up:
migrate -database 'postgres://nebula:password@localhost:5432/nebula?sslmode=disable' -path migrations up
migrate-down:
migrate -database 'postgres://nebula:password@localhost:5432/nebula?sslmode=disable' -path migrations down
.PHONY: all clean test format tools models migrate-up migrate-down