Skip to content

Releases: homebysix/pre-commit-macadmin

v1.16.2

10 Jun 16:17
7314aab
Compare
Choose a tag to compare

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 using open(), as this is the default behavior.

v1.16.1

09 Jun 00:26
ccf1629
Compare
Choose a tag to compare

Added

  • New format-xml-plist hook 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-shebangs parameter to specify additional custom shebangs in use for your environment. Works with the check-munki-pkgsinfo, check-jamf-scripts, check-jamf-extension-attributes, check-outset-scripts, and check-munkiadmin-scripts hooks. (#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

11 Feb 20:27
f39601b
Compare
Choose a tag to compare

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-makecatalogs hook (#72, thanks to @kbrewersq).
  • Added optional --munki-repo parameter to check-munki-pkgsinfo and munki-makecatalogs hooks, 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).

v1.14.1

20 Nov 17:26
612b990
Compare
Choose a tag to compare

Fixed

  • Fixed a bug that would cause a Python traceback when checking Munki repos that use nopkg type items.

v1.14.0

19 Nov 20:53
26bd432
Compare
Choose a tag to compare

Added

  • check-preference-manifests hook now outputs more specific error message if pfm_documentation_url is empty (#67, thanks to @relgit).
  • check-munki-pkgsinfo hook now detects path mismatches on case-sensitive filesystems (#66, thanks to @AaronBurchfield).

v1.13.0

18 Nov 11:20
2ad7bf8
Compare
Choose a tag to compare

Changed

  • Now uses packaging.version.Version instead of distutils.version.LooseVersion for AutoPkg version comparisons. This may cause unexpected behavior if unusual versions are used in MinimumVersion keys.
  • Updated yaml.safe_load() to YAML(typ='safe').

v1.12.4

26 Feb 12:16
1852669
Compare
Choose a tag to compare

Added

  • Added compatibility checks for MunkiOptionalReceiptEditor processor, included in AutoPkg 2.7+.
  • Added a --require-pkg-blocking-apps argument for the check-munki-pkgsinfo hook. If specified, tests will fail for any pkg installer that does not have a blocking_applications array (even an empty one). This change maintains the alignment with Munki's design established in 1.12.3 while allowing Munki repo admins flexibility to be stricter in their own environments.

Changed

  • Improved compatibility with Munki repos where the pkgsinfo folder is not at the root level. (#63, thanks to @kbrewersq)

v1.12.3

10 Apr 02:55
04225b3
Compare
Choose a tag to compare

Changed

  • Changed check-munki-pkgsinfo to WARN on the absence of the blocking_applications array for installers in pkg format, rather than to fail the pre-commit test. This better aligns with Munki's own design, which does not require blocking_applications.

Fixed

  • Resolved an uncaught exception if the git config email is unset. (#58)

v1.12.2

27 Feb 21:15
c668a2d
Compare
Choose a tag to compare

Changed

  • Adjusted preference manifest checks to require pfm_name for every preference key except immediate descendants of keys whose pfm_type is array (#54).
  • Improved preference manifest output to more accurately specify which key or subkey is failing pfm_name or pfm_type checks.
  • Continued development work on a hook that checks Jamf JSON schema manifests.

v1.12.1

23 Dec 00:26
7d3cd42
Compare
Choose a tag to compare

Changed

  • Minor adjustments to check-preference-manifests hook.