-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (26 loc) · 1.11 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
SHELL:=/bin/bash
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
.PHONY: all fresh fulluninstall install dependencies clean
all: application
fresh: clean dependencies
fulluninstall: uninstall clean
testenv: clean_testenv
docker-compose up --build
clean_testenv:
docker-compose down
build_image:
docker build -f $(ROOT_DIR)/dockerfile -t tedivm/gitconsensus_service:latest .
publish_image: build_image
docker push tedivm/gitconsensus_service:latest
dependencies:
if [ ! -d $(ROOT_DIR)/venv ]; then python3 -m venv $(ROOT_DIR)/venv; fi
source $(ROOT_DIR)/venv/bin/activate; python -m pip install wheel; yes w | python -m pip install -e .
upgrade_dependencies: venv
source $(ROOT_DIR)/venv/bin/activate; ./bin/upgrade_dependencies.sh $(ROOT_DIR)/requirements.txt
application:
if [ ! -d $(ROOT_DIR)/venv ]; then python3 -m venv $(ROOT_DIR)/venv; fi
source $(ROOT_DIR)/venv/bin/activate; python -m pip install wheel; yes w | python -m pip install -r requirements.txt
clean:
rm -rf $(ROOT_DIR)/venv;
rm -rf $(ROOT_DIR)/gitconsensusservice/*.pyc;
rm -rf $(ROOT_DIR)/gitconsensusservice.egg-info;