Files
sigma-rules/Makefile
T
Ross Wolf 8a561b3817 Add kibana-push command (#38)
* Add kibana-push command
* Add ctx.exit instead of return
* Make the base branch configurable
2020-07-08 18:02:12 -06:00

59 lines
1.1 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/
.PHONY: kibana-commit
kibana-commit: deps
@echo "PREP KIBANA-COMMIT: $(app_name)"
$(PYTHON) -m detection_rules kibana-commit