Skip to content

Commit 82866b3

Browse files
authored
Merge pull request #104 from homebysix/dev
1.22.1 merge to main
2 parents 3dc78d7 + 168f22e commit 82866b3

5 files changed

Lines changed: 19 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ All notable changes to this project will be documented in this file. This projec
1212

1313
## [Unreleased]
1414

15-
Nothing yet.
15+
### Added
16+
17+
- Added support for minimum AutoPkg version validation for new [VariableSetter](https://github.com/autopkg/autopkg/wiki/Processor-VariableSetter) processor.
18+
19+
### Changed
20+
21+
- `check-munki-pkgsinfo` now skips warning about missing packages if a `PackageCompleteURL` key is set in the pkginfo.
1622

1723
## [1.22.0] - 2025-11-25
1824

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ For any hook in this repo you wish to use, add the following to your pre-commit
1515

1616
```yaml
1717
- repo: https://github.com/homebysix/pre-commit-macadmin
18-
rev: v1.22.0
18+
rev: v1.22.1
1919
hooks:
2020
- id: check-plists
2121
# - id: ...
@@ -147,7 +147,7 @@ When combining arguments that take lists (for example: `--required-keys`, `--cat
147147

148148
```yaml
149149
- repo: https://github.com/homebysix/pre-commit-macadmin
150-
rev: v1.22.0
150+
rev: v1.22.1
151151
hooks:
152152
- id: check-munki-pkgsinfo
153153
args: ['--catalogs', 'testing', 'stable', '--']
@@ -157,7 +157,7 @@ But if you also use the `--categories` argument, you would move the trailing `--
157157

158158
```yaml
159159
- repo: https://github.com/homebysix/pre-commit-macadmin
160-
rev: v1.22.0
160+
rev: v1.22.1
161161
hooks:
162162
- id: check-munki-pkgsinfo
163163
args: ['--catalogs', 'testing', 'stable', '--categories', 'Design', 'Engineering', 'Web Browsers', '--']
@@ -169,7 +169,7 @@ If it looks better to your eye, feel free to use a multi-line list for long argu
169169

170170
```yaml
171171
- repo: https://github.com/homebysix/pre-commit-macadmin
172-
rev: v1.22.0
172+
rev: v1.22.1
173173
hooks:
174174
- id: check-munki-pkgsinfo
175175
args: [

pre_commit_macadmin_hooks/check_autopkg_recipes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ def validate_minimumversion(process, min_vers, ignore_min_vers_before, filename)
235235
"URLDownloader": "0.0",
236236
"URLDownloaderPython": "2.4.1",
237237
"URLTextSearcher": "0.2.9",
238+
"VariableSetter": "2.9.0",
238239
"Versioner": "0.1.0",
239240
}
240241

pre_commit_macadmin_hooks/check_munki_pkgsinfo.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def main(argv: Optional[List[str]] = None) -> int:
176176
# Check for rogue categories.
177177
if args.categories and pkginfo.get("category") not in args.categories:
178178
print(
179-
f"{filename}: category \"{pkginfo.get('category')}\" is not in list of approved categories"
179+
f'{filename}: category "{pkginfo.get("category")}" is not in list of approved categories'
180180
)
181181
retval = 1
182182

@@ -204,13 +204,17 @@ def main(argv: Optional[List[str]] = None) -> int:
204204

205205
# Begin checks that apply to both installers and uninstallers
206206
for i_type in ("installer", "uninstaller"):
207-
208207
# Check for missing or case-conflicted installer or uninstaller items
209208
if not _check_case_sensitive_path(
210209
os.path.join(
211210
args.munki_repo, "pkgs", pkginfo.get(f"{i_type}_item_location", "")
212211
)
213212
):
213+
if i_type == "installer" and "PackageCompleteURL" in pkginfo:
214+
# PackageCompleteURL allows download from a URL outside of the Munki repo,
215+
# so the installer need not exist in the repo.
216+
continue
217+
214218
msg = f"{i_type} item does not exist or path is not case sensitive"
215219
if args.warn_on_missing_installer_items:
216220
print(f"{filename}: WARNING: {msg}")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
name="pre-commit-macadmin",
77
description="Pre-commit hooks for Mac admins, client engineers, and IT consultants.",
88
url="https://github.com/homebysix/pre-commit-macadmin",
9-
version="1.22.0",
9+
version="1.22.1",
1010
author="Elliot Jordan",
1111
author_email="elliot@elliotjordan.com",
1212
packages=["pre_commit_macadmin_hooks"],

0 commit comments

Comments
 (0)