PKG-Defender v1.0.2
PKG-Defender v1.0.2
Released July 5, 2026
What's Changed
Fixed
- Smoke test only tested the pip-installed package, never the PyInstaller binary — version mismatches or broken CLI commands passed CI undetected. Added
build-binariesto smoke-testneeds; downloadslinux-amd64binary artifact; verifies--versionmatches the release tag; verifies--helpandstatus --jsonrespond correctly (release.yml). Regression test: binary version mismatch now fails CI. - PyInstaller frozen binary always reported
1.0.0because the hardcoded version fallback at__init__.py:25(Tier 4) was never updated beyond v1.0.0. Added Tier 3.5 fallback — CI generatessrc/pkg_defender/_build_version.pyat build time with the actual release version, bundled into the binary via the import graph (__init__.py:18-23). The import uses# type: ignore[import-not-found]to accommodate mypy since the file is generated post-check. Falls through to"1.0.0"only if all prior methods fail (release.yml,.gitignore). Regression test:pkgd --versionin the PyInstaller binary now reports the correct version. check-version.pyregex^__version__withre.MULTILINErequired__version__at column 0, but all assignments in__init__.pyare indented inside try/except blocks — version validation was silently skipped for indented files. Changed regex to^\s*__version__to allow leading whitespace (check-version.py:167). Regression test: old regex returnsNoneon indented__version__; new regex correctly captures the version.- Homebrew formula
descwas 107 characters (max 80) and started with "The" — causedbrew audit --new --formula pkg-defenderto fail. Shorteneddescto 69 characters with no leading article; Regression test:brew audit --new --formula pkg-defendernow passes. - Release pipeline Homebrew tap update job failed on
ubuntu-latest(24.04) runners because Homebrew is pre-installed at/home/linuxbrew/.linuxbrew/binbut excluded from$PATH(actions/runner-images#6283). Added aSet up Homebrew PATHstep that writes the path to$GITHUB_PATHbefore the firstbrewinvocation (release.yml).
📖 3 Commits since **v1.0.1**
| Commit | Description | Author |
|---|---|---|
75f6320 |
fix(release): fix version resolution bug in check-version.py release script |
Division 7 |
c258b0a |
chore(release): change PROJECT_NAME env in release workflow; improve custom release body script |
Division 7 |
3733e03 |
ci(brew-tap): fix Homebrew trust for audit and set brew PATH on runner, pin action SHA, fix formula desc length | Division 7 |