mirror of
https://github.com/frappe/bench.git
synced 2025-01-08 00:04:38 +00:00
Develop (#400)
* [fix] readme * Removed swtich-to-v4 and switch-to-v5 commands
This commit is contained in:
parent
a39fb1eb8d
commit
a6a1ee9a82
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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')
|
||||
|
@ -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:
|
||||
|
@ -7,6 +7,7 @@
|
||||
- git:
|
||||
repo=https://github.com/frappe/bench
|
||||
dest=/home/frappe/bench-repo
|
||||
depth=no
|
||||
tags:
|
||||
- bench_install
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user