autopkg-wrapper 2024.5.2__tar.gz → 2024.5.3__tar.gz
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.
- {autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/PKG-INFO +1 -1
- autopkg_wrapper-2024.5.3/autopkg_wrapper/__init__.py +1 -0
- {autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/autopkg_wrapper/autopkg_wrapper.py +24 -16
- {autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/pyproject.toml +1 -1
- autopkg_wrapper-2024.5.2/autopkg_wrapper/__init__.py +0 -1
- {autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/LICENSE +0 -0
- {autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/README.md +0 -0
- {autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/autopkg_wrapper/notifier/__init__.py +0 -0
- {autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/autopkg_wrapper/notifier/slack.py +0 -0
- {autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/autopkg_wrapper/utils/__init__.py +0 -0
- {autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/autopkg_wrapper/utils/args.py +0 -0
- {autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/autopkg_wrapper/utils/git_functions.py +0 -0
- {autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/autopkg_wrapper/utils/logging.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: autopkg-wrapper
|
|
3
|
-
Version: 2024.5.
|
|
3
|
+
Version: 2024.5.3
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2024.5.3"
|
|
@@ -4,6 +4,7 @@ import logging
|
|
|
4
4
|
import plistlib
|
|
5
5
|
import subprocess
|
|
6
6
|
import sys
|
|
7
|
+
from datetime import datetime
|
|
7
8
|
from itertools import chain
|
|
8
9
|
from pathlib import Path
|
|
9
10
|
|
|
@@ -85,7 +86,12 @@ class Recipe(object):
|
|
|
85
86
|
self.results["failed"] = True
|
|
86
87
|
self.results["imported"] = ""
|
|
87
88
|
else:
|
|
88
|
-
|
|
89
|
+
report_dir = Path("/tmp/autopkg")
|
|
90
|
+
report_time = datetime.now().strftime("%Y-%m-%dT%H-%M-%S")
|
|
91
|
+
report_name = Path(f"{self.name}-{report_time}.plist")
|
|
92
|
+
|
|
93
|
+
report_dir.mkdir(parents=True, exist_ok=True)
|
|
94
|
+
report = report_dir / report_name
|
|
89
95
|
report.touch(exist_ok=True)
|
|
90
96
|
|
|
91
97
|
try:
|
|
@@ -195,21 +201,23 @@ def parse_recipe_list(recipes, recipe_file, post_processors):
|
|
|
195
201
|
logging.info(f"Recipes: {recipes}") if recipes else None
|
|
196
202
|
logging.info(f"Recipe List: {recipe_file}") if recipe_file else None
|
|
197
203
|
|
|
198
|
-
if recipe_file
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
204
|
+
if recipe_file:
|
|
205
|
+
if recipe_file.suffix == ".json":
|
|
206
|
+
with open(recipe_file, "r") as f:
|
|
207
|
+
recipe_list = json.load(f)
|
|
208
|
+
elif recipe_file.suffix == ".txt":
|
|
209
|
+
with open(recipe_file, "r") as f:
|
|
210
|
+
recipe_list = f.read().splitlines()
|
|
211
|
+
if recipes:
|
|
212
|
+
if isinstance(recipes, list):
|
|
213
|
+
recipe_list = recipes
|
|
214
|
+
elif isinstance(recipes, str):
|
|
215
|
+
if recipes.find(",") != -1:
|
|
216
|
+
# Assuming recipes separated by commas
|
|
217
|
+
recipe_list = [recipe.strip() for recipe in recipes.split(",") if recipe]
|
|
218
|
+
else:
|
|
219
|
+
# Assuming recipes separated by space
|
|
220
|
+
recipe_list = [recipe.strip() for recipe in recipes.split(" ") if recipe]
|
|
213
221
|
|
|
214
222
|
if recipe_list is None:
|
|
215
223
|
logging.error(
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
name = "autopkg-wrapper"
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
repository = "https://github.com/smithjw/autopkg-wrapper"
|
|
8
|
-
version = "2024.5.
|
|
8
|
+
version = "2024.5.3"
|
|
9
9
|
|
|
10
10
|
[tool.poetry.scripts]
|
|
11
11
|
# When built and installed by pip, the command autopkg_wrapper will be availble in to run within that environment
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2024.5.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{autopkg_wrapper-2024.5.2 → autopkg_wrapper-2024.5.3}/autopkg_wrapper/utils/git_functions.py
RENAMED
|
File without changes
|
|
File without changes
|