Releases: homebysix/pre-commit-macadmin
v1.22.0
v1.21.1
v1.21.0
v1.20.0
Added
check-autopkg-recipesandcheck-munki-pkgsinfonow validates thatsupported_architecturesvalues are set appropriately.- In anticipation of Munki 7,
check-munki-pkgsinfovalidates thatversion_scriptis a string starting with a script shebang. check-munki-pkgsinfonow checks for specific deprecatedinstaller_typeanduninstall_methodvalues, most of which are detailed here.- Added new FindAndReplace core processor version requirements for AutoPkg recipes.
Changed
v1.19.0
Added
- Added
--warn-on-missing-installer-itemsflag that makes missing Munki install/uninstall items a warning instead of a failure. (#86, thanks to @haircut) - Apply the same checks to
uninstaller_item_locationthat were previously applied toinstaller_item_location. check-autopkg-recipesrequires Munki recipepkginfodicts to contain at leastnameanddescription.check-autopkg-recipesnow validates thatuninstall_methodanduninstall_scriptare set appropriately in Munki recipes.
Changed
check-autopkg-recipesincludes jamf-upload as an AutoPkg recipe type, and updated processors included in jamf/jamf-upload recipe convention.check-munki-pkgsinforequires aversionkey in addition tonameanddescription.
Fixed
- Bug fix in
check-munkiadmin-scriptsthat prevented script names from processing correctly. - Bug fix in
check-munki-pkgsinfothat prevented--warn-on-duplicate-importsflag from working correctly.
v1.18.0
Added
check-munki-pkgsinfonow produces an error ifuninstall_methodis set touninstall_scriptbut no uninstall script is present in the pkginfo.check-munki-pkgsinfonow checks for deprecated pkginfo keys.check-munki-pkgsinfonow includes checks for many possible pkginfo key typos, not justminimum_os_versionandmaximum_os_version. Suggestions welcome if you think of more.check-munkiadmin-scriptsnow checks whether scripts are named correctly, not just executable.
v1.17.0
Added
-
New
--warn-on-duplicate-importsflag for use with Munki pkginfo checks, for Munki administrators who don't care about multiple potential versions of the same pkginfo/pkg in the repository (perhaps because of differingsupported_architecturesor other keys).When this is specified, the pre-commit hook will warn when files with
__1(and similar) suffixes are seen in the pkgsinfo/pkgs folders. This will enbale pre-commit hooks to pass, as long as there are no other errors. Omitting the--warn-on-duplicate-importsflag will continue generating an error and failing the hooks, as was the previous behavior. -
Include
SignToolVerifierandURLDownloaderPythonAutoPkg processors when suggesting minimum versions. -
Updated AutoPkg recipe type convention checking to include new
JamfUploadprocessors as well asURLDownloaderPythonandMunkiInfoCreator. -
Added a suggestion to use Rich Trouton's VariablePlaceholder processor for setting arbitrary environment variables instead of supplying unexpected arguments to existing processors.
Fixed
- Fixed FileWaveImporter processor detection.
v1.16.2
Fixed
- Fixed two bugs in shebang validation that would result in ModuleNotFoundError when running check-munki-pkgsinfo hook.
Removed
- Dropped Python 2 string instance validation. No further support will be provided for Python 2.
Changed
- Added PyUpgrade hook to this repo's own pre-commit linting, in order to ensure modern Python syntax.
- Don't specify
"r"mode when usingopen(), as this is the default behavior.
v1.16.1
Added
- New
format-xml-plisthook to auto-format XML property list (plist) files to use tabs instead of spaces, and will alphabetically sort keys. (#79, thanks to n8felton) - New
--valid-shebangsparameter to specify additional custom shebangs in use for your environment. Works with thecheck-munki-pkgsinfo,check-jamf-scripts,check-jamf-extension-attributes,check-outset-scripts, andcheck-munkiadmin-scriptshooks. (#75, thanks to @kbrewersq) - Checks to ensure the MinimumVersion key in AutoPkg recipes is a string. (If quotes are omitted in yaml-formatted recipes, this key could be interpreted as a float.)
Removed
- No longer warn when using AutoPkg MinimumVersion greater than 2.0.
- Python 2 support deprecated and will be removed in the future.
Changed
- Hook output rewritten to use f-strings instead of
.format().
v1.15.0
Added
- Now validates that all XML
<result>tags are closed in Jamf extension attributes (#76, thanks to @WardsParadox).
Fixed
- Fixed a bug in the
munki-makecatalogshook (#72, thanks to @kbrewersq). - Added optional
--munki-repoparameter tocheck-munki-pkgsinfoandmunki-makecatalogshooks, in order to specify a path to your Munki repo. Useful for situations where the Munki repo is a subdirectory of the Git repo itself. (#73 and #74, thanks to @kbrewersq).