-
Notifications
You must be signed in to change notification settings - Fork 4
/
justfile
35 lines (25 loc) · 907 Bytes
/
justfile
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
set export
set dotenv-load
PLATFORM := if os() == "macos" { "darwin" } else { os() }
lint:
golangci-lint run --fix
test:
go test -covermode=count -coverprofile=count.out -v ./...
mock:
@rm -rf mocks
mockery --all
download-golang-migrate-binary:
if [ ! -f ./migrate.{{PLATFORM}}-amd64 ] ; \
then \
curl -sfL https://github.com/golang-migrate/migrate/releases/download/v4.14.1/migrate.{{PLATFORM}}-amd64.tar.gz | tar -xvz; \
fi;
db-migrate: download-golang-migrate-binary
./migrate.{{PLATFORM}}-amd64 -source file://db/migrations -database $POSTMAND_DATABASE_URL up
db-test-migrate: download-golang-migrate-binary
./migrate.{{PLATFORM}}-amd64 -source file://db/migrations -database $POSTMAND_TEST_DATABASE_URL up
run-server:
go run cmd/postmand/main.go server
run-worker:
go run cmd/postmand/main.go worker
swag-init:
swag init -g cmd/postmand/main.go --parseDependency --parseDepth 2