autopkg-wrapper 2024.3.1__py3-none-any.whl → 2024.5.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- __version__ = "2024.3.1"
1
+ __version__ = "2024.5.2"
@@ -32,8 +32,10 @@ class Recipe(object):
32
32
 
33
33
  return name
34
34
 
35
- def verify_trust_info(self):
36
- cmd = ["/usr/local/bin/autopkg", "verify-trust-info", self.filename, "-vv"]
35
+ def verify_trust_info(self, debug):
36
+ verbose_output = ["-vvvv"]
37
+ cmd = ["/usr/local/bin/autopkg", "verify-trust-info", self.filename]
38
+ cmd = cmd + verbose_output if debug else cmd
37
39
  cmd = " ".join(cmd)
38
40
  logging.debug(f"cmd: {str(cmd)}")
39
41
 
@@ -77,7 +79,7 @@ class Recipe(object):
77
79
 
78
80
  return {"imported": imported_items, "failed": failed_items}
79
81
 
80
- def run(self):
82
+ def run(self, debug):
81
83
  if self.verified is False:
82
84
  self.error = True
83
85
  self.results["failed"] = True
@@ -88,15 +90,16 @@ class Recipe(object):
88
90
 
89
91
  try:
90
92
  post_processor_cmd = list(chain.from_iterable([("--post", processor) for processor in self.post_processors])) if self.post_processors else None
91
- initial_cmd = [
93
+ verbose_output = ["-vvvv"]
94
+ cmd = [
92
95
  "/usr/local/bin/autopkg",
93
96
  "run",
94
97
  self.filename,
95
- "-vv",
96
98
  "--report-plist",
97
99
  str(report),
98
100
  ]
99
- cmd = initial_cmd + post_processor_cmd if post_processor_cmd else initial_cmd
101
+ cmd = cmd + post_processor_cmd if post_processor_cmd else cmd
102
+ cmd = cmd + verbose_output if debug else cmd
100
103
  cmd = " ".join(cmd)
101
104
 
102
105
  logging.debug(f"cmd: {str(cmd)}")
@@ -245,21 +248,21 @@ def parse_post_processors(post_processors):
245
248
  return post_processors_list
246
249
 
247
250
 
248
- def process_recipe(recipe, disable_recipe_trust_check):
251
+ def process_recipe(recipe, disable_recipe_trust_check, debug):
249
252
  if disable_recipe_trust_check:
250
253
  logging.debug("Setting Recipe verification to None")
251
254
  recipe.verified = None
252
255
  else:
253
256
  logging.debug("Checking Recipe verification")
254
- recipe.verify_trust_info()
257
+ recipe.verify_trust_info(debug)
255
258
 
256
259
  match recipe.verified:
257
260
  case False | None if disable_recipe_trust_check:
258
261
  logging.debug("Running Recipe without verification")
259
- recipe.run()
262
+ recipe.run(debug)
260
263
  case True:
261
264
  logging.debug("Running Recipe after successful verification")
262
- recipe.run()
265
+ recipe.run(debug)
263
266
  case False:
264
267
  recipe.update_trust_info()
265
268
 
@@ -278,7 +281,7 @@ def main():
278
281
 
279
282
  for recipe in recipe_list:
280
283
  logging.info(f"Processing Recipe: {recipe.name}")
281
- process_recipe(recipe=recipe, disable_recipe_trust_check=args.disable_recipe_trust_check)
284
+ process_recipe(recipe=recipe, disable_recipe_trust_check=args.disable_recipe_trust_check, debug=args.debug)
282
285
  update_recipe_repo(git_info=override_repo_info, recipe=recipe, disable_recipe_trust_check=args.disable_recipe_trust_check, args=args)
283
286
  slack.send_notification(recipe=recipe, token=args.slack_token) if args.slack_token else None
284
287
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autopkg-wrapper
3
- Version: 2024.3.1
3
+ Version: 2024.5.2
4
4
  Summary: A package used to execute some autopkg functions, primarily within the context of a GitHub Actions runner.
5
5
  Home-page: https://github.com/smithjw/autopkg-wrapper
6
6
  License: BSD-3-Clause
@@ -11,8 +11,8 @@ Classifier: License :: OSI Approved :: BSD License
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.12
13
13
  Requires-Dist: chardet (==5.2.0)
14
- Requires-Dist: idna (==3.6)
15
- Requires-Dist: pygithub (==2.2.0)
14
+ Requires-Dist: idna (==3.7)
15
+ Requires-Dist: pygithub (==2.3.0)
16
16
  Requires-Dist: requests (==2.31.0)
17
17
  Requires-Dist: ruamel-yaml (==0.18.6)
18
18
  Requires-Dist: toml (==0.10.2)
@@ -1,13 +1,13 @@
1
- autopkg_wrapper/__init__.py,sha256=2jHM0RMj0Ioe6iU6Z9Z6qKI1gUHatCF_Ppu_Z66n9bM,25
2
- autopkg_wrapper/autopkg_wrapper.py,sha256=qhTXW59hkaTe_u-fInNM55Y5qLkiZqb0yXBhwGi4S10,10387
1
+ autopkg_wrapper/__init__.py,sha256=GutD5USPa0NhGX5YEeFCEZazyKDHf2SZrqhbbnLzpM4,25
2
+ autopkg_wrapper/autopkg_wrapper.py,sha256=O0WyIuiKbKUYq9dpXNczh6lCzqDAubeH70Bw6-wKEUg,10575
3
3
  autopkg_wrapper/notifier/__init__.py,sha256=ShXQBVjyiSOHxoQJS2BvNG395W4KZfqMxZWBAR0MZrE,22
4
4
  autopkg_wrapper/notifier/slack.py,sha256=nKHeSmgDaTaSUo19ZgnjjjKzeWgg34fMHUwNj9C5FMY,1982
5
5
  autopkg_wrapper/utils/__init__.py,sha256=ShXQBVjyiSOHxoQJS2BvNG395W4KZfqMxZWBAR0MZrE,22
6
6
  autopkg_wrapper/utils/args.py,sha256=BGbskLzeBeq7ae0Vp1XuoAD5gqKGILOTaNUHvo2DhNY,3934
7
7
  autopkg_wrapper/utils/git_functions.py,sha256=zMMzwRG9V2VFaQk3y_o1H63_hzI1qohwBKaetNDS2mY,2975
8
8
  autopkg_wrapper/utils/logging.py,sha256=3knpMViO_zAU8WM5bSImQaz5M01vMFk_raB4lt1cbvo,324
9
- autopkg_wrapper-2024.3.1.dist-info/LICENSE,sha256=PpNOQjZGcsKFuA0wU16YU7PueVxqPX4OnyZ7TlLQlq4,1602
10
- autopkg_wrapper-2024.3.1.dist-info/METADATA,sha256=Yfp7jD_P6cqAjXsV8S0Z1Yni1GcFwWVc4Zsa_WJ95lk,2659
11
- autopkg_wrapper-2024.3.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
- autopkg_wrapper-2024.3.1.dist-info/entry_points.txt,sha256=w9VfrX4aY0ZzJndvzjSI5lLe_sCP2tIq0I5bRLlEKJc,125
13
- autopkg_wrapper-2024.3.1.dist-info/RECORD,,
9
+ autopkg_wrapper-2024.5.2.dist-info/LICENSE,sha256=PpNOQjZGcsKFuA0wU16YU7PueVxqPX4OnyZ7TlLQlq4,1602
10
+ autopkg_wrapper-2024.5.2.dist-info/METADATA,sha256=JzCjCf0xMpDT07HKQU5CbbJewVLhgfVo2lL3Q0FuS7k,2659
11
+ autopkg_wrapper-2024.5.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
+ autopkg_wrapper-2024.5.2.dist-info/entry_points.txt,sha256=w9VfrX4aY0ZzJndvzjSI5lLe_sCP2tIq0I5bRLlEKJc,125
13
+ autopkg_wrapper-2024.5.2.dist-info/RECORD,,