This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
48 lines (36 loc) · 1.1 KB
/
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
39
40
41
42
43
44
45
46
47
48
develop: setup-git install-requirements
upgrade: install-requirements
createdb -E utf-8 zeus || true
poetry run zeus db upgrade
setup-git:
pip install "pre-commit>=2.2.0,<2.3.0"
pre-commit install
git config branch.autosetuprebase always
git config --bool flake8.strict true
cd .git/hooks && ln -sf ../../hooks/* ./
install-requirements: install-python-requirements install-js-requirements
install-python-requirements:
poetry install --extras=test
install-js-requirements:
yarn install
test:
poetry run py.test
yarn test
db:
$(MAKE) create-db
poetry run zeus db upgrade
drop-db:
dropdb --if-exists -U postgres -h 127.0.0.1 zeus
create-db:
createdb -E utf-8 -U postgres -h 127.0.0.1 zeus
reset-db: drop-db db
build-docker-image:
docker build \
-t zeus \
--build-arg NODE_VERSION=$(shell bin/get-node-version | tr -d '\n') \
--build-arg YARN_VERSION=$(shell bin/get-yarn-version | tr -d '\n') \
--build-arg BUILD_REVISION=$(shell git rev-parse HEAD | tr -d '\n') \
.
run-docker-image:
docker rm zeus || exit 0
docker run --init --rm -d -p 8080:8080/tcp -v ~/.zeus:/workspace --name zeus zeus