forked from getsentry/sentry-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (42 loc) · 1.44 KB
/
Makefile
File metadata and controls
52 lines (42 loc) · 1.44 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
SENTRY_PATH := `python -c 'import sentry; print sentry.__file__.rsplit("/", 3)[0]'`
UNAME_S := $(shell uname -s)
develop: setup-git install-yarn
pip install "pip>=9,<10"
pip install -e git+https://github.com/getsentry/sentry.git#egg=sentry[dev,optional]
pip install -e ".[tests]"
yarn install
install-yarn:
@echo "--> Installing Node dependencies"
@hash yarn 2> /dev/null || npm install -g yarn
# Use NODE_ENV=development so that yarn installs both dependencies + devDependencies
NODE_ENV=development yarn install --ignore-optional
install-tests: develop
pip install .[tests]
setup-git:
@echo "--> Installing git hooks"
git config branch.autosetuprebase always
git config core.ignorecase false
cd .git/hooks && ln -sf ../../config/hooks/* ./
pip install "pre-commit==1.18.2" $(PIP_OPTS)
pre-commit install --install-hooks
@echo ""
clean:
@echo "--> Cleaning static cache"
rm -f src/sentry_plugins/*/static/dist
@echo "--> Cleaning pyc files"
find . -name "*.pyc" -delete
@echo "--> Cleaning python build artifacts"
rm -rf build/ dist/ src/sentry_plugins/assets.json
@echo ""
lint: lint-js lint-python
lint-python:
@echo "--> Linting python"
bash -eo pipefail -c "flake8 | tee .artifacts/flake8.pycodestyle.log"
@echo ""
lint-js:
@echo "--> Linting javascript"
bash -eo pipefail -c "${SENTRY_PATH}/bin/lint --js --parseable . | tee .artifacts/eslint.codestyle.xml"
@echo ""
test: install-tests
py.test
.PHONY: develop install-tests