diff --git a/NEWS.rst b/NEWS.rst index f5078e31a576bb0d46f49ba0cf4acb5cf43e7995_TkVXUy5yc3Q=..349a1a9110efb8a0187ad5ce57dcf354bd54d034_TkVXUy5yc3Q= 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -13,6 +13,8 @@ Change isort options to be able to show differences. +Use the presence of a Dockerfile as a sign that the current directory is a super project. Avoids starting to create files by error. + 14.0.0 ------ diff --git a/odoo_scripts/docker_build.py b/odoo_scripts/docker_build.py index f5078e31a576bb0d46f49ba0cf4acb5cf43e7995_b2Rvb19zY3JpcHRzL2RvY2tlcl9idWlsZC5weQ==..349a1a9110efb8a0187ad5ce57dcf354bd54d034_b2Rvb19zY3JpcHRzL2RvY2tlcl9idWlsZC5weQ== 100644 --- a/odoo_scripts/docker_build.py +++ b/odoo_scripts/docker_build.py @@ -95,6 +95,11 @@ dev = nmspc.dev push = nmspc.push + dockerfile = "Dockerfile" + if not os.path.exists(dockerfile): + _logger.critical("No dockerfile found") + return 1 + c = Config() registry = c.registry project = c.image @@ -134,7 +139,6 @@ a = arg.split("=") buildargs[a[0]] = a[1] _logger.debug("Build args: %s", buildargs) - dockerfile = "Dockerfile" if dev: debug_dockerfile = "Dockerfile.debug" call(["cp", dockerfile, debug_dockerfile]) @@ -144,7 +148,7 @@ myfile.write("RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ") if odoo_type in ("odoo11", "odoo13", "odoo15"): myfile.write( - "python3-watchdog python3-ipdb python3-pyinotify " "python3-wheel\n" + "python3-watchdog python3-ipdb python3-pyinotify python3-wheel\n" ) # newer setuptools_scm>6 is not compatible with python 3.5 due # to the use of f-strings