diff --git a/README.md b/README.md index beb27fea..0ea8c84c 100755 --- a/README.md +++ b/README.md @@ -101,6 +101,9 @@ Install X Code (from App store) and HomeBrew (http://brew.sh/) first brew install python brew install git + +Download the Script + curl "https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py" -o install.py #### 2. Run the install script @@ -109,7 +112,7 @@ If you are on a fresh server and logged in as root, use --user flag to create a python install.py --develop --user frappe -For the current user: +For developer setup: sudo python install.py --develop diff --git a/bench/app.py b/bench/app.py index f6dd4ac5..281a0f8f 100755 --- a/bench/app.py +++ b/bench/app.py @@ -309,12 +309,6 @@ def switch_to_master(apps=None, bench_path='.', upgrade=False): def switch_to_develop(apps=None, bench_path='.', upgrade=False): switch_branch('develop', apps=apps, bench_path=bench_path, upgrade=upgrade) -def switch_to_v4(apps=None, bench_path='.', upgrade=False): - switch_branch('v4.x.x', apps=apps, bench_path=bench_path, upgrade=upgrade) - -def switch_to_v5(apps=None, bench_path='.', upgrade=False): - switch_branch('v5.x.x', apps=apps, bench_path=bench_path, upgrade=upgrade) - def get_version_from_string(contents, field='__version__'): match = re.search(r"^(\s*%s\s*=\s*['\\\"])(.+?)(['\"])(?sm)" % field, contents) diff --git a/bench/commands/__init__.py b/bench/commands/__init__.py index 1da94c30..1bf61806 100755 --- a/bench/commands/__init__.py +++ b/bench/commands/__init__.py @@ -29,15 +29,12 @@ bench_command.add_command(remove_app) bench_command.add_command(new_site) -from bench.commands.update import update, retry_upgrade, switch_to_branch, switch_to_master, switch_to_develop, switch_to_v4, switch_to_v5 +from bench.commands.update import update, retry_upgrade, switch_to_branch, switch_to_master, switch_to_develop bench_command.add_command(update) bench_command.add_command(retry_upgrade) bench_command.add_command(switch_to_branch) bench_command.add_command(switch_to_master) bench_command.add_command(switch_to_develop) -bench_command.add_command(switch_to_v4) -bench_command.add_command(switch_to_v5) - from bench.commands.utils import (start, restart, set_nginx_port, set_ssl_certificate, set_ssl_certificate_key, set_url_root, set_mariadb_host, set_default_site, download_translations, shell, backup_site, backup_all_sites, release, renew_lets_encrypt, diff --git a/bench/commands/update.py b/bench/commands/update.py index ab916981..b3bcc383 100755 --- a/bench/commands/update.py +++ b/bench/commands/update.py @@ -156,23 +156,3 @@ def switch_to_develop(upgrade=False): print('Please run `bench update --patch` to be safe from any differences in database schema') -@click.command('switch-to-v4') -@click.option('--upgrade',is_flag=True) -def switch_to_v4(upgrade=False): - "Switch frappe and erpnext to v4 branch" - from bench.app import switch_to_v4 - switch_to_v4(upgrade=upgrade) - print() - print('Switched to v4') - print('Please run `bench update --patch` to be safe from any differences in database schema') - - -@click.command('switch-to-v5') -@click.option('--upgrade',is_flag=True) -def switch_to_v5(upgrade=False): - "Switch frappe and erpnext to v5 branch" - from bench.app import switch_to_v5 - switch_to_v5(upgrade=upgrade) - print() - print('Switched to v5') - print('Please run `bench update --patch` to be safe from any differences in database schema') diff --git a/bench/utils.py b/bench/utils.py index 95e2cc26..8ef8b70a 100755 --- a/bench/utils.py +++ b/bench/utils.py @@ -601,6 +601,13 @@ def update_translations(app, lang): f.flush() print('downloaded for', app, lang) + +def download_chart_of_accounts(): + charts_dir = os.path.join('apps', "erpnext", "erpnext", 'accounts', 'chart_of_accounts', "submitted") + csv_file = os.path.join(translations_dir, lang + '.csv') + url = "https://translate.erpnext.com/files/{}-{}.csv".format(app, lang) + r = requests.get(url, stream=True) + r.raise_for_status() def print_output(p): while p.poll() is None: diff --git a/vm/ansible/vm.yml b/vm/ansible/vm.yml index 42b638d7..18357509 100644 --- a/vm/ansible/vm.yml +++ b/vm/ansible/vm.yml @@ -7,6 +7,7 @@ - git: repo=https://github.com/frappe/bench dest=/home/frappe/bench-repo + depth=no tags: - bench_install