glances/Makefile

91 lines
2.6 KiB
Makefile
Raw Normal View History

2018-12-27 12:10:26 +03:00
PORT?=8008
2021-06-12 10:42:02 +03:00
LASTTAG = $(shell git describe --tags --abbrev=0)
2018-12-27 12:10:26 +03:00
install:
sensible-browser "https://github.com/nicolargo/glances#installation"
2021-05-29 19:48:27 +03:00
venv-python:
virtualenv -p /usr/bin/python3 venv
2018-12-27 12:10:26 +03:00
2021-05-29 19:48:27 +03:00
venv-dev:
./venv/bin/pip install -r dev-requirements.txt
./venv/bin/pip install -r doc-requirements.txt
2018-12-27 12:10:26 +03:00
2021-05-29 19:48:27 +03:00
venv-dev-upgrade:
./venv/bin/pip install --upgrade pip
2021-05-29 19:48:27 +03:00
./venv/bin/pip install --upgrade -r dev-requirements.txt
./venv/bin/pip install --upgrade -r doc-requirements.txt
2021-04-11 11:39:30 +03:00
venv:
./venv/bin/pip install -r requirements.txt
./venv/bin/pip install -r optional-requirements.txt
venv-upgrade:
2021-05-29 19:48:27 +03:00
./venv/bin/pip install --upgrade -r dev-requirements.txt
./venv/bin/pip install --upgrade -r requirements.txt
./venv/bin/pip install --upgrade -r optional-requirements.txt
2021-06-12 10:42:02 +03:00
test: venv
./venv/bin/python ./unitest.py
./venv/bin/python ./unitest-restful.py
./venv/bin/python ./unitest-xmlrpc.py
2022-03-20 11:13:02 +03:00
./venv/bin/python -m black ./glances --check --exclude outputs/static
format: venv
2022-03-20 11:13:02 +03:00
./venv/bin/python -m black ./glances --exclude outputs/static
2021-05-29 19:48:27 +03:00
docs: venv-dev
2021-07-17 10:31:07 +03:00
./venv/bin/python -m glances -C ./conf/glances.conf --api-doc > ./docs/api.rst
cd docs && ./build.sh && cd ..
2021-05-29 19:48:27 +03:00
docs-server: docs
(sleep 2 && sensible-browser "http://localhost:$(PORT)") &
cd docs/_build/html/ && ../../../venv/bin/python -m http.server $(PORT)
2021-05-29 19:48:27 +03:00
webui: venv-dev
2021-11-11 12:46:29 +03:00
cd glances/outputs/static/ && npm ci && npm run build
2021-05-29 19:48:27 +03:00
2022-05-26 00:12:09 +03:00
run:
./venv/bin/python -m glances -C ./conf/glances.conf
2022-05-26 00:12:09 +03:00
run-debug:
./venv/bin/python -m glances -C ./conf/glances.conf -d
2022-05-26 00:12:09 +03:00
run-webserver:
./venv/bin/python -m glances -C ./conf/glances.conf -w
2022-05-26 00:12:09 +03:00
run-restapiserver:
2021-07-16 16:39:24 +03:00
./venv/bin/python -m glances -C ./conf/glances.conf -w --disable-webui
2022-05-26 00:12:09 +03:00
run-server:
./venv/bin/python -m glances -C ./conf/glances.conf -s
2022-05-26 00:12:09 +03:00
run-client:
./venv/bin/python -m glances -C ./conf/glances.conf -c localhost
2022-05-26 00:12:09 +03:00
run-browser:
2021-06-13 11:49:01 +03:00
./venv/bin/python -m glances -C ./conf/glances.conf --browser
2022-05-26 00:12:09 +03:00
show-version:
2021-06-13 11:49:01 +03:00
./venv/bin/python -m glances -C ./conf/glances.conf -V
2022-05-26 00:12:09 +03:00
show-issue:
2021-06-13 11:49:01 +03:00
./venv/bin/python -m glances -C ./conf/glances.conf --issue
2022-05-26 00:12:09 +03:00
profiling:
2021-06-05 18:40:47 +03:00
@echo "Please complete and run: sudo ./venv/bin/py-spy record -o ./docs/_static/glances-flame.svg -d 60 -s --pid <GLANCES PID>"
2022-05-26 00:12:09 +03:00
trace-malloc:
2022-02-25 13:24:12 +03:00
@echo "Malloc test is running, please wait ~30 secondes..."
2022-02-20 11:38:53 +03:00
./venv/bin/python -m glances -C ./conf/glances.conf --trace-malloc --stop-after 15 --quiet
2022-05-26 00:12:09 +03:00
memory-leak:
2022-02-25 13:24:12 +03:00
./venv/bin/python -m glances -C ./conf/glances.conf --memory-leak
2021-06-12 10:42:02 +03:00
release-note:
2021-06-12 20:15:31 +03:00
git --no-pager log $(LASTTAG)..HEAD --first-parent --pretty=format:"* %s"
2021-08-14 13:45:53 +03:00
@echo "\n"
2021-06-12 20:15:31 +03:00
git --no-pager shortlog -s -n $(LASTTAG)..HEAD
2021-06-12 10:42:02 +03:00
2022-05-03 09:22:43 +03:00
.PHONY: test docs docs-server venv