2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-23 04:29:02 +00:00

add switch to develop and remove migrate-to-v5

This commit is contained in:
Pratik Vyas 2015-03-17 16:50:43 +05:30
parent b559572277
commit 52bfaa0272
2 changed files with 12 additions and 8 deletions

View File

@ -149,6 +149,9 @@ def switch_branch(branch, apps=None, bench='.'):
def switch_to_master(apps=None, bench='.'):
switch_branch('master', apps=apps, bench=bench)
def switch_to_develop(apps=None, bench='.'):
switch_branch('develop', apps=apps, bench=bench)
def switch_to_v4(apps=None, bench='.'):
switch_branch('v4.x.x', apps=apps, bench=bench)

View File

@ -275,13 +275,6 @@ def migrate_3to4(path):
migrate_3to4=os.path.join(os.path.dirname(__file__), 'migrate3to4.py'),
site=path))
@click.command('migrate-to-v5')
def _migrate_to_v5(bench='.'):
"Migrate to Version 5"
click.echo("This will migrate all sites in the bench to version 5. Version 5 is still work in progress and NOT STABLE.")
if click.confirm("This is irreversible. Do you want to continue?", abort=True):
migrate_to_v5(bench=bench)
@click.command('switch-to-master')
def _switch_to_master():
"Switch frappe and erpnext to master branch"
@ -290,6 +283,14 @@ def _switch_to_master():
print 'Switched to master'
print 'Please run `bench update --patch` to be safe from any differences in database schema'
@click.command('switch-to-develop')
def _switch_to_develop():
"Switch frappe and erpnext to develop branch"
switch_to_develop()
print
print 'Switched to develop'
print 'Please run `bench update --patch` to be safe from any differences in database schema'
@click.command('switch-to-v4')
def _switch_to_v4():
"Switch frappe and erpnext to v4 branch"
@ -548,6 +549,7 @@ bench.add_command(_set_mariadb_host)
bench.add_command(set_default_site)
bench.add_command(migrate_3to4)
bench.add_command(_switch_to_master)
bench.add_command(_switch_to_develop)
bench.add_command(_switch_to_v4)
bench.add_command(shell)
bench.add_command(_backup_all_sites)
@ -556,4 +558,3 @@ bench.add_command(_prime_wheel_cache)
bench.add_command(_release)
bench.add_command(patch)
bench.add_command(set_url_root)
bench.add_command(_migrate_to_v5)