mirror of
https://github.com/frappe/bench.git
synced 2024-11-13 16:56:33 +00:00
refactor: added ignore resolution to ignore messages in install app
This commit is contained in:
parent
bbca3e9fab
commit
67638b19b7
13
bench/app.py
13
bench/app.py
@ -176,13 +176,20 @@ class App(AppMeta):
|
|||||||
shutil.move(active_app_path, archived_app_path)
|
shutil.move(active_app_path, archived_app_path)
|
||||||
|
|
||||||
@step(title="Installing App {repo}", success="App {repo} Installed")
|
@step(title="Installing App {repo}", success="App {repo} Installed")
|
||||||
def install(self, skip_assets=False, verbose=False, resolved=False, restart_bench=True):
|
def install(
|
||||||
|
self,
|
||||||
|
skip_assets=False,
|
||||||
|
verbose=False,
|
||||||
|
resolved=False,
|
||||||
|
restart_bench=True,
|
||||||
|
ignore_resolution=False,
|
||||||
|
):
|
||||||
import bench.cli
|
import bench.cli
|
||||||
from bench.utils.app import get_app_name
|
from bench.utils.app import get_app_name
|
||||||
|
|
||||||
verbose = bench.cli.verbose or verbose
|
verbose = bench.cli.verbose or verbose
|
||||||
app_name = get_app_name(self.bench.name, self.repo)
|
app_name = get_app_name(self.bench.name, self.repo)
|
||||||
if not resolved and self.repo != "frappe":
|
if not resolved and self.repo != "frappe" and not ignore_resolution:
|
||||||
click.secho(
|
click.secho(
|
||||||
f"Ignoring dependencies of {self.name}. To install dependencies use --resolve-deps",
|
f"Ignoring dependencies of {self.name}. To install dependencies use --resolve-deps",
|
||||||
fg="yellow",
|
fg="yellow",
|
||||||
@ -195,7 +202,7 @@ class App(AppMeta):
|
|||||||
verbose=verbose,
|
verbose=verbose,
|
||||||
skip_assets=skip_assets,
|
skip_assets=skip_assets,
|
||||||
restart_bench=restart_bench,
|
restart_bench=restart_bench,
|
||||||
resolution = self.local_resolution
|
resolution=self.local_resolution
|
||||||
)
|
)
|
||||||
|
|
||||||
@step(title="Cloning and installing {repo}", success="App {repo} Installed")
|
@step(title="Cloning and installing {repo}", success="App {repo} Installed")
|
||||||
|
@ -392,7 +392,9 @@ class BenchSetup(Base):
|
|||||||
print(f"Installing {len(apps)} applications...")
|
print(f"Installing {len(apps)} applications...")
|
||||||
|
|
||||||
for app in apps:
|
for app in apps:
|
||||||
App(app, bench=self.bench, to_clone=False).install( skip_assets=True, restart_bench=False)
|
App(app, bench=self.bench, to_clone=False).install(
|
||||||
|
skip_assets=True, restart_bench=False, ignore_resolution=True
|
||||||
|
)
|
||||||
|
|
||||||
def python(self, apps=None):
|
def python(self, apps=None):
|
||||||
"""Install and upgrade Python dependencies for specified / all installed apps on given Bench
|
"""Install and upgrade Python dependencies for specified / all installed apps on given Bench
|
||||||
|
Loading…
Reference in New Issue
Block a user