mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 00:37:51 +00:00
fix: Drop support for Frappe v4-5-6 ;)
This was long time due. Removing software that won't be compatible with this version of Bench is a no-brainer. Sorry for not posting this in advance but the world has been moving too fast. Use `pip install frappe-bench --only-binary='all'` to install the latest supported version for your machine :D
This commit is contained in:
parent
984959beb8
commit
616dff8fbb
@ -21,7 +21,6 @@ from bench.utils import (
|
|||||||
generate_command_cache,
|
generate_command_cache,
|
||||||
get_cmd_output,
|
get_cmd_output,
|
||||||
get_env_cmd,
|
get_env_cmd,
|
||||||
get_frappe,
|
|
||||||
is_bench_directory,
|
is_bench_directory,
|
||||||
is_dist_editable,
|
is_dist_editable,
|
||||||
is_root,
|
is_root,
|
||||||
@ -162,12 +161,6 @@ def change_uid():
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def old_frappe_cli(bench_path="."):
|
|
||||||
f = get_frappe(bench_path=bench_path)
|
|
||||||
os.chdir(os.path.join(bench_path, "sites"))
|
|
||||||
os.execv(f, [f] + sys.argv[2:])
|
|
||||||
|
|
||||||
|
|
||||||
def app_cmd(bench_path="."):
|
def app_cmd(bench_path="."):
|
||||||
f = get_env_cmd("python", bench_path=bench_path)
|
f = get_env_cmd("python", bench_path=bench_path)
|
||||||
os.chdir(os.path.join(bench_path, "sites"))
|
os.chdir(os.path.join(bench_path, "sites"))
|
||||||
|
@ -92,14 +92,6 @@ def check_latest_version():
|
|||||||
log(f"A newer version of bench is available: {local_version} → {pypi_version}")
|
log(f"A newer version of bench is available: {local_version} → {pypi_version}")
|
||||||
|
|
||||||
|
|
||||||
def get_frappe(bench_path='.'):
|
|
||||||
frappe = get_env_cmd('frappe', bench_path=bench_path)
|
|
||||||
if not os.path.exists(frappe):
|
|
||||||
print('frappe app is not installed. Run the following command to install frappe')
|
|
||||||
print('bench get-app https://github.com/frappe/frappe.git')
|
|
||||||
return frappe
|
|
||||||
|
|
||||||
|
|
||||||
def get_env_cmd(cmd, bench_path='.'):
|
def get_env_cmd(cmd, bench_path='.'):
|
||||||
return os.path.abspath(os.path.join(bench_path, 'env', 'bin', cmd))
|
return os.path.abspath(os.path.join(bench_path, 'env', 'bin', cmd))
|
||||||
|
|
||||||
@ -776,30 +768,24 @@ def validate_upgrade(from_ver, to_ver, bench_path='.'):
|
|||||||
|
|
||||||
|
|
||||||
def post_upgrade(from_ver, to_ver, bench_path='.'):
|
def post_upgrade(from_ver, to_ver, bench_path='.'):
|
||||||
from bench.config.common_site_config import get_config
|
|
||||||
from bench.config import redis
|
from bench.config import redis
|
||||||
from bench.config.supervisor import generate_supervisor_config
|
from bench.config.supervisor import generate_supervisor_config
|
||||||
from bench.config.nginx import make_nginx_conf
|
from bench.config.nginx import make_nginx_conf
|
||||||
conf = get_config(bench_path=bench_path)
|
from bench.bench import Bench
|
||||||
|
|
||||||
|
conf = Bench(bench_path).conf
|
||||||
print("-" * 80 + f"Your bench was upgraded to version {to_ver}")
|
print("-" * 80 + f"Your bench was upgraded to version {to_ver}")
|
||||||
|
|
||||||
if conf.get('restart_supervisor_on_update'):
|
if conf.get('restart_supervisor_on_update'):
|
||||||
redis.generate_config(bench_path=bench_path)
|
redis.generate_config(bench_path=bench_path)
|
||||||
generate_supervisor_config(bench_path=bench_path)
|
generate_supervisor_config(bench_path=bench_path)
|
||||||
make_nginx_conf(bench_path=bench_path)
|
make_nginx_conf(bench_path=bench_path)
|
||||||
|
print(
|
||||||
if from_ver == 4 and to_ver == 5:
|
"As you have setup your bench for production, you will have to reload configuration for "
|
||||||
setup_backups(bench_path=bench_path)
|
"nginx and supervisor. To complete the migration, please run the following commands:"
|
||||||
|
"\nsudo service nginx restart"
|
||||||
if from_ver <= 5 and to_ver == 6:
|
"\nsudo supervisorctl reload"
|
||||||
setup_socketio(bench_path=bench_path)
|
)
|
||||||
|
|
||||||
message = """
|
|
||||||
As you have setup your bench for production, you will have to reload configuration for nginx and supervisor. To complete the migration, please run the following commands
|
|
||||||
sudo service nginx restart
|
|
||||||
sudo supervisorctl reload
|
|
||||||
""".strip()
|
|
||||||
print(message)
|
|
||||||
|
|
||||||
|
|
||||||
def update_translations_p(args):
|
def update_translations_p(args):
|
||||||
|
Loading…
Reference in New Issue
Block a user