From a618d58654a0519df0b048e651693c8b6164b418 Mon Sep 17 00:00:00 2001 From: Elliot Jordan Date: Sun, 11 Feb 2024 12:25:16 -0800 Subject: [PATCH 1/2] Bump version to 1.15.0 --- CHANGELOG.md | 14 +++++++++++++- README.md | 8 ++++---- setup.py | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 019e3b0..ba28d52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,17 @@ All notable changes to this project will be documented in this file. This projec Nothing yet. +## [1.15.0] - 2024-02-11 + +### Added + +- Now validates that all XML `` 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). + ## [1.14.1] - 2023-11-20 ### Fixed @@ -324,7 +335,8 @@ Nothing yet. - Initial release -[Unreleased]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.14.1...HEAD +[Unreleased]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.15.0...HEAD +[1.15.0]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.14.1...v1.15.0 [1.14.1]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.14.0...v1.14.1 [1.14.0]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.13.0...v1.14.0 [1.13.0]: https://github.com/homebysix/pre-commit-macadmin/compare/v1.12.4...v1.13.0 diff --git a/README.md b/README.md index f97dd64..b1bd051 100644 --- a/README.md +++ b/README.md @@ -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.14.0 + rev: v1.15.0 hooks: - id: check-plists # - id: ... @@ -132,7 +132,7 @@ When combining arguments that take lists (for example: `--required-keys`, `--cat ```yaml - repo: https://github.com/homebysix/pre-commit-macadmin - rev: v1.14.0 + rev: v1.15.0 hooks: - id: check-munki-pkgsinfo args: ['--catalogs', 'testing', 'stable', '--'] @@ -142,7 +142,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.14.0 + rev: v1.15.0 hooks: - id: check-munki-pkgsinfo args: ['--catalogs', 'testing', 'stable', '--categories', 'Design', 'Engineering', 'Web Browsers', '--'] @@ -154,7 +154,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.14.0 + rev: v1.15.0 hooks: - id: check-munki-pkgsinfo args: [ diff --git a/setup.py b/setup.py index e46c825..9d1aa3a 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ name="pre-commit-macadmin", description="Pre-commit hooks for Mac admins, client engineers, and IT consultants.", url="https://github.com/homebysix/pre-commit-macadmin", - version="1.14.0", + version="1.15.0", author="Elliot Jordan", author_email="elliot@elliotjordan.com", packages=["pre_commit_hooks"], From ac89be2715707882a5807e451e4a28b12e780a39 Mon Sep 17 00:00:00 2001 From: Elliot Jordan Date: Sun, 11 Feb 2024 12:25:57 -0800 Subject: [PATCH 2/2] Update pre-commit config --- .pre-commit-config.yaml | 2 +- pre_commit_hooks/check_munki_pkgsinfo.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b8bfa42..33aa641 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,6 +17,6 @@ repos: - id: trailing-whitespace args: [--markdown-linebreak-ext=md] - repo: https://github.com/python/black - rev: 23.11.0 + rev: 24.1.1 hooks: - id: black diff --git a/pre_commit_hooks/check_munki_pkgsinfo.py b/pre_commit_hooks/check_munki_pkgsinfo.py index 28562d5..827de83 100755 --- a/pre_commit_hooks/check_munki_pkgsinfo.py +++ b/pre_commit_hooks/check_munki_pkgsinfo.py @@ -36,9 +36,7 @@ def build_argument_parser(): ) parser.add_argument("filenames", nargs="*", help="Filenames to check.") parser.add_argument( - "--munki-repo", - default=".", - help="path to local munki repo defaults to '.'" + "--munki-repo", default=".", help="path to local munki repo defaults to '.'" ) parser.add_argument( "--warn-on-missing-icons", @@ -146,7 +144,9 @@ def main(argv=None): # Check for missing or case-conflicted installer items if not _check_case_sensitive_path( - os.path.join(args.munki_repo, "pkgs", pkginfo.get("installer_item_location", "")) + os.path.join( + args.munki_repo, "pkgs", pkginfo.get("installer_item_location", "") + ) ): print( "{}: installer item does not exist or path is not case sensitive".format(