forked from dennis-tra/nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (26 loc) · 896 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
default: all
all: clean build
test:
go test ./...
build:
go build -o dist/nebula cmd/nebula/*
linux-build:
GOOS=linux GOARCH=amd64 go build -o dist/nebula cmd/nebula/*
format:
gofumpt -w -l .
clean:
rm -r dist || true
docker:
docker build . -t dennis-tra/nebula-crawler:latest
tools:
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/[email protected]
go install github.com/volatiletech/sqlboiler/[email protected]
go install github.com/volatiletech/sqlboiler/v4/drivers/[email protected]
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