Skip to content

Releases: homebysix/pre-commit-macadmin

v1.22.0

25 Nov 17:44
b580da9

Choose a tag to compare

Changed

  • format-xml-plist hook now uses Python's plistlib instead of macOS's plutil. This enables compatibility with a wider selection of CI/CD runners, including pre-commit.ci.

v1.21.1

27 Oct 03:11
518108e

Choose a tag to compare

Fixed

  • Fixed bug in check-autopkg-recipes that would flag processors as "not conventional" for recipe types that have multiple filename hints. Realistically, this only affected .jamf or .jamf-upload recipe types.

v1.21.0

21 Sep 20:12
bd76f4a

Choose a tag to compare

Added

  • check-munki-pkgsinfo now detects the incorrect key condition and suggests using installable_condition instead.

Changed

  • Renamed internal package from pre_commit_hooks to pre_commit_macadmin_hooks to resolve namespace collision with the official pre_commit_hooks package. (#78)

v1.20.0

09 Aug 19:24
92d8e26

Choose a tag to compare

Added

  • check-autopkg-recipes and check-munki-pkgsinfo now validates that supported_architectures values are set appropriately.
  • In anticipation of Munki 7, check-munki-pkgsinfo validates that version_script is a string starting with a script shebang.
  • check-munki-pkgsinfo now checks for specific deprecated installer_type and uninstall_method values, most of which are detailed here.
  • Added new FindAndReplace core processor version requirements for AutoPkg recipes.

Changed

  • Improvements to check-preference-manifests hook. (#91, thanks to @relgit)
  • check-autopkg-recipes ignores supported_architectures values within Munki pkginfo dictionaries that appear to be AutoPkg recipe substitution variables (e.g. %ARCH%).

v1.19.0

16 Jan 22:45
dc632a8

Choose a tag to compare

Added

  • Added --warn-on-missing-installer-items flag that makes missing Munki install/uninstall items a warning instead of a failure. (#86, thanks to @haircut)
  • Apply the same checks to uninstaller_item_location that were previously applied to installer_item_location.
  • check-autopkg-recipes requires Munki recipe pkginfo dicts to contain at least name and description.
  • check-autopkg-recipes now validates that uninstall_method and uninstall_script are set appropriately in Munki recipes.

Changed

  • check-autopkg-recipes includes jamf-upload as an AutoPkg recipe type, and updated processors included in jamf/jamf-upload recipe convention.
  • check-munki-pkgsinfo requires a version key in addition to name and description.

Fixed

  • Bug fix in check-munkiadmin-scripts that prevented script names from processing correctly.
  • Bug fix in check-munki-pkgsinfo that prevented --warn-on-duplicate-imports flag from working correctly.

v1.18.0

04 Jan 21:18
bc0d39d

Choose a tag to compare

Added

  • check-munki-pkgsinfo now produces an error if uninstall_method is set to uninstall_script but no uninstall script is present in the pkginfo.
  • check-munki-pkgsinfo now checks for deprecated pkginfo keys.
  • check-munki-pkgsinfo now includes checks for many possible pkginfo key typos, not just minimum_os_version and maximum_os_version. Suggestions welcome if you think of more.
  • check-munkiadmin-scripts now checks whether scripts are named correctly, not just executable.

v1.17.0

22 Dec 20:33
dcf837e

Choose a tag to compare

Added

  • New --warn-on-duplicate-imports flag 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 differing supported_architectures or 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-imports flag will continue generating an error and failing the hooks, as was the previous behavior.

  • Include SignToolVerifier and URLDownloaderPython AutoPkg processors when suggesting minimum versions.

  • Updated AutoPkg recipe type convention checking to include new JamfUpload processors as well as URLDownloaderPython and MunkiInfoCreator.

  • 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

10 Jun 16:17
7314aab

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

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

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).