-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (34 loc) · 877 Bytes
/
Copy pathMakefile
File metadata and controls
47 lines (34 loc) · 877 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
41
42
43
44
45
46
47
include ./.env
export CGO_CFLAGS = -IC:\msys64\mingw64\include
export CGO_LDFLAGS = -LC:\msys64\mingw64\lib -ltesseract -lleptonica
export CC = C:\msys64\mingw64\bin\gcc.exe
export CXX = C:\msys64\mingw64\bin\g++.exe
export PATH := C:\msys64\mingw64\bin;$(PATH)
define db_up
migrate -path ./migrations -database "sqlite3://${DATABASE_PATH}" up
endef
define db_down
migrate -path ./migrations -database "sqlite3://${DATABASE_PATH}" down
endef
define db_force
migrate -database "sqlite3://${DATABASE_PATH}" -path ./migrations force $(version)
endef
define db_create
migrate create -ext sql -dir ./migrations -seq $(migration)
endef
db_force:
$(call db_force)
db_down:
$(call db_down)
db_up:
$(call db_up)
db_create:
$(call db_create)
prebuild:
@echo Environment configured.
dev: prebuild
@air
build: db_up
@go build -o bin/main ./cmd
run: build
@bin/main