-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakefile
34 lines (27 loc) · 790 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
SHELL = /bin/bash
VIRTUALENV_DIR = ${HOME}/.virtualenv
.PHONY: dev
dev: ${VIRTUALENV_DIR}/slappd
source ${VIRTUALENV_DIR}/slappd/bin/activate && \
pip install -U bandit black pip pylint && \
pip install --editable .
.PHONY: docker-build
docker-build:
docker build -t slappd .
.PHONY: docker-run
docker-run: docker-build
docker run -v ${HOME}/.config/slappd:/home/slappd/.config/slappd slappd
.PHONY: install
install: ${VIRTUALENV_DIR}/slappd
source ${VIRTUALENV_DIR}/slappd/bin/activate && \
pip install -U pip && \
pip install --upgrade .
${VIRTUALENV_DIR}/slappd:
mkdir -p ${VIRTUALENV_DIR}
cd ${VIRTUALENV_DIR} && python3 -m venv slappd
.PHONY: lint
lint:
source ${VIRTUALENV_DIR}/slappd/bin/activate && \
bandit -r . && \
black slappd
.DEFAULT_GOAL := install