Use checkout Alembic root in release integration
This commit is contained in:
@@ -191,7 +191,20 @@ def registered_module_migration_plan(
|
||||
|
||||
|
||||
def _repo_root() -> Path:
|
||||
return Path(__file__).resolve().parents[3]
|
||||
packaged_root = Path(__file__).resolve().parents[3]
|
||||
configured = os.environ.get("GOVOPLAN_CORE_SOURCE_ROOT")
|
||||
candidates = [
|
||||
Path(configured).expanduser() if configured else None,
|
||||
Path.cwd(),
|
||||
packaged_root,
|
||||
]
|
||||
for candidate in candidates:
|
||||
if candidate is None:
|
||||
continue
|
||||
resolved = candidate.resolve()
|
||||
if (resolved / "alembic.ini").exists() and (resolved / "alembic").is_dir():
|
||||
return resolved
|
||||
return packaged_root
|
||||
|
||||
|
||||
def alembic_config(
|
||||
|
||||
Reference in New Issue
Block a user