cook-build 0.6.0__tar.gz → 0.6.1__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.
- {cook_build-0.6.0/src/cook_build.egg-info → cook_build-0.6.1}/PKG-INFO +1 -1
- {cook_build-0.6.0 → cook_build-0.6.1}/pyproject.toml +1 -5
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook/__main__.py +11 -1
- {cook_build-0.6.0 → cook_build-0.6.1/src/cook_build.egg-info}/PKG-INFO +1 -1
- {cook_build-0.6.0 → cook_build-0.6.1}/LICENSE +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/README.md +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/README.rst +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/setup.cfg +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook/__init__.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook/actions.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook/contexts.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook/controller.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook/manager.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook/task.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook/util.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook_build.egg-info/SOURCES.txt +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook_build.egg-info/dependency_links.txt +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook_build.egg-info/entry_points.txt +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook_build.egg-info/requires.txt +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/src/cook_build.egg-info/top_level.txt +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/tests/test_actions.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/tests/test_contexts.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/tests/test_controller.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/tests/test_examples.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/tests/test_main.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/tests/test_manager.py +0 -0
- {cook_build-0.6.0 → cook_build-0.6.1}/tests/test_util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "cook-build"
|
|
3
|
-
version = "0.6.
|
|
3
|
+
version = "0.6.1"
|
|
4
4
|
readme = "README.md"
|
|
5
5
|
dependencies = [
|
|
6
6
|
"colorama>=0.4.6",
|
|
@@ -21,9 +21,5 @@ dev = [
|
|
|
21
21
|
"twine>=6.2.0",
|
|
22
22
|
]
|
|
23
23
|
|
|
24
|
-
[build-system]
|
|
25
|
-
requires = ["setuptools>=61.0"]
|
|
26
|
-
build-backend = "setuptools.build_meta"
|
|
27
|
-
|
|
28
24
|
[project.scripts]
|
|
29
25
|
cook = "cook.__main__:__main__"
|
|
@@ -356,7 +356,7 @@ def __main__(cli_args: list[str] | None = None) -> None:
|
|
|
356
356
|
with closing(
|
|
357
357
|
sqlite3.connect(args.db, detect_types=sqlite3.PARSE_DECLTYPES)
|
|
358
358
|
) as connection:
|
|
359
|
-
connection
|
|
359
|
+
_setup_schema(connection)
|
|
360
360
|
controller = Controller(manager.resolve_dependencies(), connection)
|
|
361
361
|
command: Command = args.command
|
|
362
362
|
try:
|
|
@@ -370,5 +370,15 @@ def __main__(cli_args: list[str] | None = None) -> None:
|
|
|
370
370
|
sys.exit(1)
|
|
371
371
|
|
|
372
372
|
|
|
373
|
+
def _setup_schema(connection: sqlite3.Connection) -> None:
|
|
374
|
+
connection.executescript(QUERIES["schema"])
|
|
375
|
+
# Attempt to add the column which may not be present for cook versions <0.6.
|
|
376
|
+
try:
|
|
377
|
+
connection.execute("ALTER TABLE tasks ADD COLUMN last_started TIMESTAMP")
|
|
378
|
+
except sqlite3.OperationalError as ex:
|
|
379
|
+
if "duplicate column name" not in ex.args[0]:
|
|
380
|
+
raise # pragma: no cover
|
|
381
|
+
|
|
382
|
+
|
|
373
383
|
if __name__ == "__main__":
|
|
374
384
|
__main__()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|