Skip to content
Snippets Groups Projects

:pencil: do_tests.zsh: Use pg_extensions env var if it has values

Merged Vincent Hatakeyama requested to merge topic/default/pg_extensions into branch/default
1 file
+ 8
9
Compare changes
  • Side-by-side
  • Inline
+ 8
9
@@ -3,8 +3,8 @@
try:
# python 3.8+
from importlib.metadata import PackageNotFoundError, distribution, version
from importlib.metadata import PackageNotFoundError, distribution
except ModuleNotFoundError:
from importlib_metadata import ( # type: ignore[import,no-redef,assignment]
PackageNotFoundError,
distribution,
@@ -7,8 +7,7 @@
except ModuleNotFoundError:
from importlib_metadata import ( # type: ignore[import,no-redef,assignment]
PackageNotFoundError,
distribution,
version,
)
# This is maintained by bump2version.
@@ -12,7 +11,7 @@
)
# This is maintained by bump2version.
_manual_version = "20.10.1.dev"
__version__ = "20.10.1.dev"
try:
# When using an editable install, the number would be off
distrib = distribution("odoo-scripts")
@@ -16,9 +15,9 @@
try:
# When using an editable install, the number would be off
distrib = distribution("odoo-scripts")
json = loads(distrib.read_text("direct_url.json"))
if not json.get("dir_info", {}).get("editable", False):
__version__ = distrib.version
else:
__version__ = _manual_version
text = distrib.read_text("direct_url.json")
if text is not None:
json = loads(text)
if not json.get("dir_info", {}).get("editable", False):
__version__ = distrib.version
except PackageNotFoundError:
@@ -24,5 +23,5 @@
except PackageNotFoundError:
__version__ = _manual_version
pass
__author__ = "XCG Consulting"
Loading