Files
sigma-rules/Makefile
T

60 lines
1.2 KiB
Makefile
Raw Normal View History

2020-06-29 23:21:42 -06:00
#################
### detection-rules
#################
VENV := ./env/detection-rules-build
VENV_BIN := $(VENV)/bin
PYTHON := $(VENV_BIN)/python
PIP := $(VENV_BIN)/python -m pip
2020-06-29 23:21:42 -06:00
.PHONY: all
all: release
2020-06-29 23:21:42 -06:00
$(VENV):
pip3 install virtualenv
virtualenv $(VENV) --python=python3.8
$(PIP) install .[dev]
$(PIP) install setuptools -U
2020-06-29 23:21:42 -06:00
.PHONY: clean
clean:
rm -rf $(VENV) *.egg-info .eggs .egg htmlcov build dist packages .build .tmp .tox __pycache__
2020-06-29 23:21:42 -06:00
.PHONY: deps
deps: $(VENV)
2022-12-08 15:49:49 -05:00
$(PIP) install .[dev]
2020-06-29 23:21:42 -06:00
.PHONY: pytest
pytest: $(VENV) deps
$(PYTHON) -m detection_rules test
.PHONY: license-check
license-check: $(VENV) deps
@echo "LICENSE CHECK"
$(PYTHON) -m detection_rules dev license-check
2020-06-29 23:21:42 -06:00
.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 dev build-release --generate-navigator
2020-06-29 23:21:42 -06:00
rm -rf dist
mkdir dist
cp -r releases/*/*.zip dist/
2020-07-08 18:02:12 -06:00
.PHONY: kibana-commit
kibana-commit: deps
@echo "PREP KIBANA-COMMIT: $(app_name)"
$(PYTHON) -m detection_rules dev kibana-commit