Use checkout Alembic root in release integration
This commit is contained in:
@@ -32,6 +32,7 @@ PY
|
|||||||
RELEASE_TAG="${GOVOPLAN_RELEASE_TAG:-v$RELEASE_VERSION}"
|
RELEASE_TAG="${GOVOPLAN_RELEASE_TAG:-v$RELEASE_VERSION}"
|
||||||
|
|
||||||
export RELEASE_TAG RELEASE_VERSION
|
export RELEASE_TAG RELEASE_VERSION
|
||||||
|
export GOVOPLAN_CORE_SOURCE_ROOT="$ROOT"
|
||||||
export PATH="$WEBUI_BIN:$NODE_BIN:$PATH"
|
export PATH="$WEBUI_BIN:$NODE_BIN:$PATH"
|
||||||
export NPM_CONFIG_USERCONFIG="$NPM_USERCONFIG"
|
export NPM_CONFIG_USERCONFIG="$NPM_USERCONFIG"
|
||||||
unset npm_config_tmp NPM_CONFIG_TMP
|
unset npm_config_tmp NPM_CONFIG_TMP
|
||||||
|
|||||||
@@ -191,7 +191,20 @@ def registered_module_migration_plan(
|
|||||||
|
|
||||||
|
|
||||||
def _repo_root() -> Path:
|
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(
|
def alembic_config(
|
||||||
|
|||||||
Reference in New Issue
Block a user