-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (41 loc) · 846 Bytes
/
Makefile
File metadata and controls
53 lines (41 loc) · 846 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
48
49
50
51
52
53
COMPOSE=docker-compose -f docker-compose.yml
ENV_BASE=~/envs
ENV=${ENV_BASE}/sqlalchemy-cockroachdb
TOX=${ENV}/bin/tox
.PHONY: all
all: test lint
.PHONY: bootstrap
bootstrap:
@mkdir -p ${ENV}
virtualenv ${ENV}
${ENV}/bin/pip install -r dev-requirements.txt
.PHONY: clean-bootstrap-env
clean-bootstrap-env:
rm -rf ${ENV}
.PHONY: test
test:
${TOX} -e py39
.PHONY: lint
lint:
${TOX} -e lint
.PHONY: update-requirements
update-requirements:
${TOX} -e pip-compile
.PHONY: build
build: clean
${ENV}/bin/python setup.py sdist
.PHONY: clean
clean:
rm -rf dist build
.PHONY: detox
detox: clean
rm -rf .tox
.PHONY: db-up
db-up:
${COMPOSE} up -d
.PHONY: db-down
db-down:
${COMPOSE} down
.PHONY: db-recreate
db-recreate:
${COMPOSE} exec cockroach-0 ./cockroach sql --insecure -e 'drop database defaultdb; create database defaultdb;'