-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
33 lines (31 loc) · 911 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
.PHONY: serve
serve:
@echo '# Building the docker image'
@docker build ./ -t gtfobins
@echo '# Building and serving the website'
@docker run \
--rm \
--name gtfobins \
--user "$$UID" \
--publish 4000:4000 \
--volume "$$PWD:/GTFOBins/" \
gtfobins \
bundle exec jekyll serve --host 0.0.0.0
.PHONY: lint
lint:
@echo '# Setting up the virtual environment'
@python3 -m venv ./linter/.venv/
@echo '# Installing dependencies'
@. ./linter/.venv/bin/activate && PIP_USER= pip install --quiet --upgrade pip -r ./linter/requirements.txt
@echo '# Running linter'
@. ./linter/.venv/bin/activate && ./linter/linter.py
@echo '# All good!'
.PHONY: clean
clean:
@echo '# Cleaning up Docker'
@docker kill gtfobins &>/dev/null || true
@docker rmi gtfobins &>/dev/null || true
@echo '# Cleaning up filesystem'
@rm -fr ./linter/.venv/
@rm -fr ./_site/
@rm -fr ./.jekyll-cache/