snapshot of https://github.com/ActivityWatch/aw-server.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Build / Test on ubuntu-latest (push) Successful in 3m6s
Lint / lint (push) Successful in 22s
Build / typecheck (ubuntu-latest, 3.9) (push) Successful in 1m49s
Lint / format (push) Successful in 42s
Build / Test on macOS-latest (push) Has been cancelled
Build / Test on windows-latest (push) Has been cancelled
CodeQL / Analyze (python) (push) Failing after 1m31s
Some checks failed
Build / Test on ubuntu-latest (push) Successful in 3m6s
Lint / lint (push) Successful in 22s
Build / typecheck (ubuntu-latest, 3.9) (push) Successful in 1m49s
Lint / format (push) Successful in 42s
Build / Test on macOS-latest (push) Has been cancelled
Build / Test on windows-latest (push) Has been cancelled
CodeQL / Analyze (python) (push) Failing after 1m31s
This commit is contained in:
58
Makefile
Normal file
58
Makefile
Normal file
@@ -0,0 +1,58 @@
|
||||
.PHONY: aw-webui build install test typecheck package clean
|
||||
|
||||
build: aw-webui
|
||||
poetry install
|
||||
|
||||
aw-webui:
|
||||
mkdir -p aw_server/static/
|
||||
ifeq ($(SKIP_WEBUI),true) # Skip building webui if SKIP_WEBUI is true
|
||||
@echo "Skipping building webui"
|
||||
else
|
||||
rm -rf aw_server/static/*
|
||||
make --directory=aw-webui build DEV=$(DEV)
|
||||
cp -r aw-webui/dist/* aw_server/static/
|
||||
# Needed for https://github.com/ActivityWatch/activitywatch/pull/274, works around https://github.com/pypa/pip/issues/6279
|
||||
# https://github.com/ActivityWatch/activitywatch/pull/367 Other solutions have been tried but did not actually work.
|
||||
# If you aren't sure windows long paths are working, don't remove this
|
||||
rm -rf aw-webui/node_modules/.cache
|
||||
endif
|
||||
|
||||
install:
|
||||
cp misc/aw-server.service /usr/lib/systemd/user/aw-server.service
|
||||
|
||||
test:
|
||||
@# Note that extensive integration tests are also run in the bundle repo,
|
||||
@# for both aw-server and aw-server-rust, but without code coverage.
|
||||
python -c 'import aw_server'
|
||||
python -m pytest tests/test_server.py tests/test_profile.py tests/test_profile_config.py
|
||||
|
||||
typecheck:
|
||||
python -m mypy aw_server tests --ignore-missing-imports
|
||||
|
||||
package: bump-version
|
||||
rm -rf dist
|
||||
pyinstaller aw-server.spec --clean --noconfirm
|
||||
|
||||
PYFILES=$(shell find . -name '*.py')
|
||||
|
||||
lint:
|
||||
ruff check .
|
||||
|
||||
lint-fix:
|
||||
poetry run pyupgrade --py38-plus --exit-zero-even-if-changed $(PYFILES)
|
||||
ruff check --fix .
|
||||
|
||||
format:
|
||||
black .
|
||||
|
||||
bump-version:
|
||||
@# make sure to pull tags in parent repo before running this
|
||||
poetry run python -m aw_server.__about__
|
||||
VERSION=$$(grep -oP '__version__ = "v\K[^"]+' aw_server/__about__.py | head -n1); echo $$VERSION; poetry version $$VERSION
|
||||
|
||||
clean:
|
||||
rm -rf build dist
|
||||
rm -rf aw_server/__pycache__
|
||||
rm -rf aw_server/static/*
|
||||
pip3 uninstall -y aw_server
|
||||
make --directory=aw-webui clean
|
||||
Reference in New Issue
Block a user