mirror of
https://github.com/frappe/bench.git
synced 2024-11-12 00:06:36 +00:00
Merge pull request #947 from gavindsouza/switch-to-branch-fix
fix: remove deprecated pre_upgrade usage
This commit is contained in:
commit
34107e0f12
@ -358,7 +358,7 @@ def get_repo_dir(app, bench_path='.'):
|
|||||||
return os.path.join(bench_path, 'apps', app)
|
return os.path.join(bench_path, 'apps', app)
|
||||||
|
|
||||||
def switch_branch(branch, apps=None, bench_path='.', upgrade=False, check_upgrade=True):
|
def switch_branch(branch, apps=None, bench_path='.', upgrade=False, check_upgrade=True):
|
||||||
from .utils import update_requirements, update_node_packages, backup_all_sites, patch_sites, build_assets, pre_upgrade, post_upgrade
|
from .utils import update_requirements, update_node_packages, backup_all_sites, patch_sites, build_assets, post_upgrade
|
||||||
from . import utils
|
from . import utils
|
||||||
apps_dir = os.path.join(bench_path, 'apps')
|
apps_dir = os.path.join(bench_path, 'apps')
|
||||||
version_upgrade = (False,)
|
version_upgrade = (False,)
|
||||||
@ -399,7 +399,6 @@ def switch_branch(branch, apps=None, bench_path='.', upgrade=False, check_upgrad
|
|||||||
if version_upgrade[0] and upgrade:
|
if version_upgrade[0] and upgrade:
|
||||||
update_requirements()
|
update_requirements()
|
||||||
update_node_packages()
|
update_node_packages()
|
||||||
pre_upgrade(version_upgrade[1], version_upgrade[2])
|
|
||||||
reload_module(utils)
|
reload_module(utils)
|
||||||
backup_all_sites()
|
backup_all_sites()
|
||||||
patch_sites()
|
patch_sites()
|
||||||
|
Loading…
Reference in New Issue
Block a user