Skip to content

Commit 2daf7ec

Browse files
committed
Ensure Munki 7 version_script is string and has shebang
1 parent 6b066eb commit 2daf7ec

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file. This projec
1515
### Added
1616

1717
- `check-autopkg-recipes` and `check-munki-pkgsinfo` now validates that `supported_architectures` values are set appropriately.
18+
- In anticipation of Munki 7, `check-munki-pkgsinfo` validates that `version_script` is a string starting with a script shebang.
1819

1920
### Changed
2021

pre_commit_hooks/check_munki_pkgsinfo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ def main(argv=None):
224224
"preinstall_script",
225225
"preuninstall_script",
226226
"uninstall_script",
227+
"version_script",
227228
)
228229
for s_type in script_types:
229230
if s_type in pkginfo:

pre_commit_hooks/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ def validate_pkginfo_key_types(pkginfo, filename):
258258
"uninstaller_item_location": str,
259259
"update_for": list,
260260
"version": str,
261+
"version_script": str,
261262
}
262263

263264
passed = True

0 commit comments

Comments
 (0)