-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 811 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 811 Bytes
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
.PHONY: dev build docker test migrate-status migrate-up migrate-down migrate-create
ROOT_DIR = $(shell pwd)
NAMESPACE = "default"
DEPLOY_NAME = "taptype"
DOCKER_NAME = "taptype"
include ./hack/hack-cli.mk
include ./hack/hack.mk
# Local development
dev:
go run main.go
# Production build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -ldflags="-s -w" -o bin/taptype .
# Docker
docker:
docker build -t taptype:latest .
# Tests
test:
go test ./utility/... -v -cover
go test ./internal/service/... -v
# Migration commands
migrate-status:
goose -dir migrations sqlite3 ./data/taptype.db status
migrate-up:
goose -dir migrations sqlite3 ./data/taptype.db up
migrate-down:
goose -dir migrations sqlite3 ./data/taptype.db down
migrate-create:
goose -dir migrations create $(name) sql