-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
38 lines (29 loc) · 802 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
include .env
export
MIGRATE=docker-compose exec web sql-migrate
ifeq ($(p),host)
MIGRATE=sql-migrate
endif
migrate-status:
$(MIGRATE) status
migrate-up:
$(MIGRATE) up
migrate-down:
$(MIGRATE) down
redo:
@read -p "Are you sure to reapply the last migration? [y/n]" -n 1 -r; \
if [[ $$REPLY =~ ^[Yy] ]]; \
then \
$(MIGRATE) redo; \
fi
create:
@read -p "What is the name of migration?" NAME; \
${MIGRATE} new $$NAME
lint-setup:
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
sudo pip install pre-commit
rm get-pip.py
pre-commit install
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.43.0
.PHONY: migrate-status migrate-up migrate-down redo create lint-setup