Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,35 @@ All notable changes to this project will be documented in this file. This projec

## [Unreleased]

Nothing yet.

## [1.25.0] - 2026-06-21

### Added

- New `format-autopkg-yaml-recipes` hook that tidies AutoPkg YAML recipes by reordering keys and normalizing spacing. Adapted from @grahampugh's [plist-yaml-plist](https://github.com/grahampugh/plist-yaml-plist).
- `check-munki-pkgsinfo` now validates the Munki 7.1 pkginfo keys `blocking_applications_manual_quit_only` (boolean) and `blocking_applications_quit_script` (string).
- `check-munki-pkgsinfo` now validates the type of `description_staged` and `display_name_staged` pkginfo keys.
- `check-munki-pkgsinfo` now validates the shebang of `blocking_applications_quit_script`, consistent with other pkginfo script fields.
- `check-munki-pkgsinfo` now warns when pkginfo keys removed in Munki 7 are present (`additional_startosinstall_options`, `copy_local`).
- `check-autopkg-recipes` includes URLDownloaderPython among the list of downloader processors.
- `check-autopkg-recipes` now validates `MinimumVersion` requirements for core AutoPkg processor arguments using a generated table from AutoPkg release history.
- `check-autopkg-recipes` now also validates deprecated and removed core processors dynamically from the generated table.
- `check-autopkg-recipes` now recognizes `intune`, `fleet`, `ws1`, and `jamfclirunner` as known recipe types in processor convention checks (strict mode), and groups `jss-upload` with `jss`.

### Changed

- `check-autopkg-recipes` now errors when encountering removed AutoPkg processors, and warns on deprecated processors. As of AutoPkg 3.0.0, CURLDownloader and CURLTextSearcher are removed.
- `check-munki-pkgsinfo` warning messages for removed `installer_type` and `uninstall_method` values now say "removed in Munki 7" instead of "deprecated".
- Simplified and minimized Python code in many hooks and tests.

### Fixed

- Fixed an operator precedence bug in `check-jamf-json-manifests` that caused spurious type-mismatch errors for `default` values in props without an explicit type.

### Removed

- Removed the "may be a duplicate import" check from `check-munki-pkgsinfo`, along with its `--warn-on-duplicate-imports` flag.

## [1.24.1] - 2026-04-12

Expand Down Expand Up @@ -478,7 +504,8 @@ All notable changes to this project will be documented in this file. This projec

- Initial release

[Unreleased]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.24.1...HEAD
[Unreleased]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.25.0...HEAD
[1.25.0]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.24.1...v1.25.0
[1.24.1]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.24.0...v1.24.1
[1.24.0]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.23.0...v1.24.0
[1.23.0]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.22.0...v1.23.0
Expand Down
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For any hook in this repo you wish to use, add the following to your pre-commit

```yaml
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.24.1
rev: v1.25.0
hooks:
- id: check-plists
# - id: ...
Expand Down Expand Up @@ -122,13 +122,10 @@ After adding a hook to your pre-commit config, it's not a bad idea to run `pre-c
(default: ".")

- Choose to just warn if icons referenced in pkginfo files are missing (this will allow pre-commit checks to pass if no other issues exist):
`args: ['--warn-on-missing-icons]`
`args: ['--warn-on-missing-icons']`

- Choose to just warn if installer/uninstaller items (`installer_item_location` or `uninstaller_item_location`) referenced in pkginfo files are missing (this will allow pre-commit checks to pass if no other issues exist):
`args: ['--warn-on-missing-installer-items]`

- Choose to just warn if pkg/pkginfo files with __1 (or similar) suffixes are detected (this will allow pre-commit checks to pass if no other issues exist):
`args: ['--warn-on-duplicate-imports]`
`args: ['--warn-on-missing-installer-items']`

- Add additional shebangs that are valid for your environment:
`args: ['--valid-shebangs', '#!/bin/macadmin/python37', '#!/bin/macadmin/python42', '--']`
Expand All @@ -151,7 +148,7 @@ When combining arguments that take lists (for example: `--required-keys`, `--cat

```yaml
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.24.1
rev: v1.25.0
hooks:
- id: check-munki-pkgsinfo
args: ['--catalogs', 'testing', 'stable', '--']
Expand All @@ -161,7 +158,7 @@ But if you also use the `--categories` argument, you would move the trailing `--

```yaml
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.24.1
rev: v1.25.0
hooks:
- id: check-munki-pkgsinfo
args: ['--catalogs', 'testing', 'stable', '--categories', 'Design', 'Engineering', 'Web Browsers', '--']
Expand All @@ -173,7 +170,7 @@ If it looks better to your eye, feel free to use a multi-line list for long argu

```yaml
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.24.1
rev: v1.25.0
hooks:
- id: check-munki-pkgsinfo
args: [
Expand Down
7 changes: 7 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ Releases are largely automated via GitHub Actions. The workflow triggers when `s

.venv/bin/python -m coverage run -m unittest discover -vs tests

1. Update the generated AutoPkg processor version table from a local AutoPkg checkout:

.venv/bin/python scripts/generate_autopkg_processor_versions.py --autopkg-repo ../autopkg
.venv/bin/python -m coverage run -m unittest discover -vs tests

Use `--full` when the generator logic changes, historical AutoPkg tags are added or corrected, or you need to rebuild from AutoPkg `0.1.0`. The default mode appends stable releases newer than the checked-in `last_walked_version`.

1. Prepare CHANGELOG.md for release by moving `[Unreleased]` changes to a new version section:

## [Unreleased]
Expand Down
230 changes: 230 additions & 0 deletions pre_commit_macadmin_hooks/autopkg_processor_versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
# This file is generated by scripts/generate_autopkg_processor_versions.py.
# Do not edit it by hand.

PROC_VERSIONS = {
"AppDmgVersioner": {
"_introduced_": "0.1.0",
},
"AppPkgCreator": {
"_introduced_": "1.0",
"bundleid": "1.1",
"force_pkg_build": "1.1",
"pkg_path": "1.1",
"version": "1.1",
"version_key": "2.4.1",
},
"BrewCaskInfoProvider": {
"_introduced_": "0.2.5",
"_removed_": "2.9.0",
},
"CURLDownloader": {
"_introduced_": "0.5.1",
"_deprecated_": "0.6.0",
"_removed_": "3.0.0",
},
"CURLTextSearcher": {
"_introduced_": "0.5.1",
"_deprecated_": "0.6.0",
"_removed_": "3.0.0",
},
"ChocolateyPackager": {
"_introduced_": "2.3",
},
"CodeSignatureVerifier": {
"_introduced_": "0.3.1",
"DISABLE_CODE_SIGNATURE_VERIFICATION": "0.4.2",
"codesign_additional_arguments": "1.0.3",
"deep_verification": "1.0.3",
"requirement": "0.4.1",
"strict_verification": "1.0.3",
},
"Copier": {
"_introduced_": "0.1.0",
"destination_path": "1.1",
"overwrite": "1.1",
},
"DeprecationWarning": {
"_introduced_": "1.1",
},
"DmgCreator": {
"_introduced_": "0.1.0",
"dmg_filesystem": "1.0.3",
"dmg_format": "0.3.0",
"dmg_megabytes": "0.3.0",
"dmg_zlib_level": "0.3.0",
},
"DmgMounter": {
"_introduced_": "0.1.0",
},
"EndOfCheckPhase": {
"_introduced_": "0.1.0",
},
"FileCreator": {
"_introduced_": "0.1.0",
"file_mode": "1.1",
},
"FileFinder": {
"_introduced_": "0.2.3",
},
"FileMover": {
"_introduced_": "0.2.9",
},
"FindAndReplace": {
"_introduced_": "2.7.6",
},
"FlatPkgPacker": {
"_introduced_": "0.2.4",
"destination_pkg": "1.1",
},
"FlatPkgUnpacker": {
"_introduced_": "0.1.0",
},
"GitHubReleasesInfoProvider": {
"_introduced_": "0.5.0",
"CURL_PATH": "1.4",
"GITHUB_RELEASES_PER_PAGE": "2.9.0",
"GITHUB_TOKEN_PATH": "2.3",
"GITHUB_URL": "2.3",
"curl_opts": "1.4",
"latest_only": "2.7.1",
},
"InstallFromDMG": {
"_introduced_": "0.4.0",
},
"Installer": {
"_introduced_": "0.4.0",
},
"MunkiCatalogBuilder": {
"_introduced_": "0.1.0",
"_deprecated_": "2.7.5",
},
"MunkiImporter": {
"_introduced_": "0.1.0",
"MUNKILIB_DIR": "2.2",
"MUNKI_PKGINFO_FILE_EXTENSION": "1.1",
"MUNKI_REPO": "0.2.5",
"MUNKI_REPO_PLUGIN": "2.2",
"additional_makepkginfo_options": "1.1",
"extract_icon": "2.2",
"force_munki_repo_lib": "2.2",
"force_munkiimport": "1.1",
"metadata_additions": "1.1",
"munkiimport_appname": "1.1",
"munkiimport_pkgname": "1.1",
"pkginfo": "1.1",
"repo_subdirectory": "1.1",
"uninstaller_pkg_path": "1.1",
"version_comparison_key": "1.1",
},
"MunkiInfoCreator": {
"_introduced_": "0.1.0",
},
"MunkiInstallsItemsCreator": {
"_introduced_": "0.1.0",
"derive_minimum_os_version": "2.6",
"version_comparison_key": "0.3.0",
},
"MunkiOptionalReceiptEditor": {
"_introduced_": "2.7",
},
"MunkiPkginfoMerger": {
"_introduced_": "0.1.0",
},
"MunkiSetDefaultCatalog": {
"_introduced_": "0.4.2",
},
"PackageRequired": {
"_introduced_": "0.5.1",
},
"PathDeleter": {
"_introduced_": "0.1.0",
},
"PkgCopier": {
"_introduced_": "0.1.0",
},
"PkgCreator": {
"_introduced_": "0.1.0",
"force_pkg_build": "0.3.0",
},
"PkgExtractor": {
"_introduced_": "0.1.0",
"extract_root": "1.1",
},
"PkgInfoCreator": {
"_introduced_": "0.1.0",
},
"PkgPayloadUnpacker": {
"_introduced_": "0.1.0",
},
"PkgRootCreator": {
"_introduced_": "0.1.0",
},
"PlistEditor": {
"_introduced_": "0.1.0",
"output_plist_path": "1.1",
"plist_data": "1.1",
},
"PlistReader": {
"_introduced_": "0.2.5",
"plist_keys": "0.4.0",
},
"SignToolVerifier": {
"_introduced_": "2.3",
},
"SparkleUpdateInfoProvider": {
"_introduced_": "0.1.0",
"CURL_PATH": "0.6.0",
"PKG": "0.5.0",
"curl_opts": "1.4",
"update_channel": "2.7.1",
"urlencode_path_component": "1.1",
},
"StopProcessingIf": {
"_introduced_": "0.1.0",
},
"Symlinker": {
"_introduced_": "0.1.0",
},
"URLDownloader": {
"_introduced_": "0.1.0",
"CHECK_FILESIZE_ONLY": "1.1",
"CURL_PATH": "1.1",
"PKG": "1.1",
"curl_opts": "1.1",
"download_dir": "1.1",
"filename": "1.1",
"prefetch_filename": "1.4",
"request_headers": "1.1",
},
"URLDownloaderPython": {
"_introduced_": "2.4.1",
"request_headers": "2.9.0",
},
"URLGetter": {
"_introduced_": "1.4",
},
"URLTextSearcher": {
"_introduced_": "0.2.9",
"CURL_PATH": "0.6.0",
"curl_opts": "1.0.4",
},
"Unarchiver": {
"_introduced_": "0.1.0",
"USE_PYTHON_NATIVE_EXTRACTOR": "2.3",
},
"VariableSetter": {
"_introduced_": "2.9.0",
},
"Versioner": {
"_introduced_": "0.1.0",
"plist_version_key": "1.1",
"skip_single_root_dir": "2.3",
},
}

GENERATION_METADATA = {
"generator_version": 2,
"last_walked_ref": "v2.9.0",
"last_walked_version": "2.9.0",
"source": "https://github.com/autopkg/autopkg",
}
4 changes: 1 addition & 3 deletions pre_commit_macadmin_hooks/check_autopkg_recipe_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
import plistlib
from xml.parsers.expat import ExpatError

import ruamel.yaml

yaml = ruamel.yaml.YAML(typ="safe")
from pre_commit_macadmin_hooks.util import yaml


def build_argument_parser() -> argparse.ArgumentParser:
Expand Down
Loading
Loading