forked from oxtyped/gpodder2go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (31 loc) · 908 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
create-migration:
migrate create -seq -ext sql -dir . ${FILENAME}
.PHONY: create-migration
migrate-up:
migrate -path=cmd/migrations/ -database sqlite3://${DB} up
.PHONY: migrate-up
migrate-down:
migrate -path=cmd/migrations -database sqlite3://${DB} down
.PHONY: migrate-down
migrate-up-docker:
docker run -v cmd/migrations:/migrations --network host migrate/migrate -path=/migrations/ -database sqlite3://${DB} up 0
.PHONY: migrate-up-docker
build:
go build -o gpodder2go main.go
.PHONY: build
# https://github.com/mvdan/gofumpt
# https://pkg.go.dev/golang.org/x/tools/cmd/goimports
fmt:
go mod tidy
gofumpt -l -w .
goimports -w .
.PHONY: fmt
# https://golangci-lint.run/
lint:
go vet ./...
golangci-lint run --disable errcheck --enable sqlclosecheck --enable misspell --enable gofmt --enable goimports
.PHONY: lint
# https://go.dev/blog/vuln
vulncheck:
govulncheck ./...
.PHONY: vulncheck