Files
thechart/Makefile
2025-07-20 13:09:07 -07:00

35 lines
1.1 KiB
Makefile

TARGET=thechart
VERSION=1.0.0
ROOT=/home/will
ICON=chart-671.png
setup-env:
pip3 install pipenv
pipenv --python 3.13
# pipenv shell --python 3.13
pipenv install --dev
pipenv run pre-commit install --install-hooks --overwrite
pipenv run pre-commit autoupdate
pipenv run pre-commit run --all-files
build:
docker buildx build --platform linux/amd64,linux/arm64 -t ${IMAGE} --push .
install:
pyinstaller --name ${TARGET} --onefile --windowed --hidden-import='PIL._tkinter_finder' --icon='${ICON}' --add-data=".env:." src/main.py
cp -f ./dist/${TARGET} ${ROOT}/Applications/
cp -f ./deploy/${TARGET}.desktop ${ROOT}/.local/share/applications/
desktop-file-validate ${ROOT}/.local/share/applications/${TARGET}.desktop
run:
python src/main.py
start:
docker-compose up -d --build
stop:
docker-compose down
test:
docker-compose exec ${TARGET} pipenv run pytest -v --tb=short
lint:
docker-compose exec ${TARGET} pipenv run pre-commit run --all-files
format:
docker-compose exec ${TARGET} pipenv run pre-commit run --all-files --show-diff
shell:
docker-compose exec -it ${TARGET} /bin/bash
.PHONY: setup-env build install run start stop test lint format shell