diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1edee54..ff0ae77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,10 +21,11 @@ jobs: - name: Install build dependencies run: | python -m pip install --upgrade pip - pip install -r scripts/requirements.txt pyinstaller + pip install uv + make setup - name: Build binary run: | - pyinstaller --onefile --name planka-cli scripts/planka_cli.py + make build - name: Package tarball run: | VERSION="${GITHUB_REF_NAME#v}" diff --git a/Makefile b/Makefile index efef2c2..888353a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: setup run build clean +.PHONY: setup run build smoke clean setup: uv venv @@ -8,7 +8,14 @@ run: uv run python scripts/planka_cli.py status build: - uv run pyinstaller --onefile --name planka-cli scripts/planka_cli.py + uv run pyinstaller --onefile --name planka-cli --collect-all plankapy scripts/planka_cli.py + +smoke: build + @tmp_home="$$(mktemp -d)"; \ + env -i PATH="/usr/bin:/bin:/usr/sbin:/sbin" HOME="$$tmp_home" \ + PYTHONNOUSERSITE=1 PYTHONPATH= PYTHONHOME= \ + ./dist/planka-cli --help; \ + rm -rf "$$tmp_home" clean: rm -rf dist build *.spec __pycache__ scripts/__pycache__