Files
sigma-rules/Makefile
T
2020-06-29 23:21:42 -06:00

55 lines
1.0 KiB
Makefile

#################
### detection-rules
#################
VENV := ./env/detection-rules-build
VENV_BIN := $(VENV)/bin
PYTHON := $(VENV_BIN)/python
PIP := $(VENV_BIN)/python -m pip
.PHONY: all
all: release
$(VENV):
pip install virtualenv
virtualenv $(VENV) --python=python3.7
$(PIP) install -r requirements.txt
$(PIP) install setuptools -U
.PHONY: clean
clean:
rm -rf $(VENV) *.egg-info .eggs .egg htmlcov build dist packages .build .tmp .tox __pycache__
.PHONY: deps
deps: $(VENV)
$(PIP) install -r requirements.txt
.PHONY: pytest
pytest: $(VENV) deps
$(PYTHON) -m detection_rules test
.PHONY: license-check
license-check: $(VENV) deps
@echo "LICENSE CHECK"
$(PYTHON) -m detection_rules license-check
.PHONY: lint
lint: $(VENV) deps
@echo "LINTING"
$(PYTHON) -m flake8 tests detection_rules --ignore D203 --max-line-length 120
.PHONY: test
test: $(VENV) lint pytest
.PHONY: release
release: deps
@echo "RELEASE: $(app_name)"
$(PYTHON) -m detection_rules build-release
rm -rf dist
mkdir dist
cp -r releases/*/*.zip dist/