示例#1
0
def init(path,
         apps_path,
         frappe_path,
         frappe_branch,
         no_procfile,
         no_backups,
         no_auto_update,
         clone_from,
         verbose,
         skip_redis_config_generation,
         clone_without_update,
         ignore_exist=False,
         skip_assets=False,
         python='python3'):
    '''
	Create a New Bench Instance.
	'''
    from bench.utils import init
    init(path,
         apps_path=apps_path,
         no_procfile=no_procfile,
         no_backups=no_backups,
         no_auto_update=no_auto_update,
         frappe_path=frappe_path,
         frappe_branch=frappe_branch,
         verbose=verbose,
         clone_from=clone_from,
         skip_redis_config_generation=skip_redis_config_generation,
         clone_without_update=clone_without_update,
         ignore_exist=ignore_exist,
         skip_assets=skip_assets,
         python=python)
    click.echo('Bench {} initialized'.format(path))
示例#2
0
def init(path, apps_path, frappe_path, frappe_branch, no_procfile, no_backups,
		no_auto_update, verbose):
	"Create a new bench"
	from bench.utils import init
	init(path, apps_path=apps_path, no_procfile=no_procfile, no_backups=no_backups,
			no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch, verbose=verbose)
	click.echo('Bench {} initialized'.format(path))
示例#3
0
def init(path,
         apps_path,
         frappe_path,
         frappe_branch,
         no_procfile,
         no_backups,
         no_auto_update,
         clone_from,
         verbose,
         skip_redis_config_generation,
         ignore_exist=False,
         python='python'):  # Let's change we're ready. - <*****@*****.**>
    '''
	Create a New Bench Instance.
	'''
    from bench.utils import init
    init(path,
         apps_path=apps_path,
         no_procfile=no_procfile,
         no_backups=no_backups,
         no_auto_update=no_auto_update,
         frappe_path=frappe_path,
         frappe_branch=frappe_branch,
         verbose=verbose,
         clone_from=clone_from,
         skip_redis_config_generation=skip_redis_config_generation,
         ignore_exist=ignore_exist,
         python=python)
    click.echo('Bench {} initialized'.format(path))
示例#4
0
def init(path, apps_path, frappe_path, frappe_branch, no_procfile, no_backups,
		no_auto_update, clone_from, verbose):
	"Create a new bench"
	from bench.utils import init
	init(path, apps_path=apps_path, no_procfile=no_procfile, no_backups=no_backups,
			no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch,
			verbose=verbose, clone_from=clone_from)
	click.echo('Bench {} initialized'.format(path))
示例#5
0
def init(path, apps_path, frappe_path, frappe_branch, no_procfile, no_backups,
		no_auto_update, clone_from, verbose, skip_bench_mkdir, skip_redis_config_generation):
	"Create a new bench"
	from bench.utils import init
	init(path, apps_path=apps_path, no_procfile=no_procfile, no_backups=no_backups,
			no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch,
			verbose=verbose, clone_from=clone_from, skip_bench_mkdir=skip_bench_mkdir, skip_redis_config_generation=skip_redis_config_generation)
	click.echo('Bench {} initialized'.format(path))
示例#6
0
文件: make.py 项目: srajelli/bench
def init(path, apps_path, frappe_path, frappe_branch, no_procfile, no_backups,
		no_auto_update, clone_from, verbose, skip_redis_config_generation,
		ignore_exist = False,
		python 		 = 'python'): # Let's change we're ready. - <*****@*****.**>
	'''
	Create a New Bench Instance.
	'''
	from bench.utils import init
	init(path, apps_path=apps_path, no_procfile=no_procfile, no_backups=no_backups,
			no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch,
			verbose=verbose, clone_from=clone_from, skip_redis_config_generation=skip_redis_config_generation,
			ignore_exist = ignore_exist,
			python 		 = python)
	click.echo('Bench {} initialized'.format(path))
示例#7
0
def init(path,
         apps_path,
         frappe_path,
         frappe_branch,
         no_procfile,
         no_backups,
         no_auto_update,
         clone_from,
         verbose,
         skip_redis_config_generation,
         clone_without_update,
         ignore_exist=False,
         skip_assets=False,
         python='python3'):
    '''
	Create a New Bench Instance.
	'''
    from bench.utils import init, log

    try:
        init(
            path,
            apps_path=apps_path,
            no_procfile=no_procfile,
            no_backups=no_backups,
            no_auto_update=no_auto_update,
            frappe_path=frappe_path,
            frappe_branch=frappe_branch,
            verbose=verbose,
            clone_from=clone_from,
            skip_redis_config_generation=skip_redis_config_generation,
            clone_without_update=clone_without_update,
            ignore_exist=ignore_exist,
            skip_assets=skip_assets,
            python=python,
        )
        log('Bench {} initialized'.format(path), level=1)
    except SystemExit:
        pass
    except:
        import os, shutil, time, six
        # add a sleep here so that the traceback of other processes doesnt overlap with the prompts
        time.sleep(1)
        log("There was a problem while creating {}".format(path), level=2)
        if six.moves.input("Do you want to rollback these changes? [Y/n]: "
                           ).lower() == "y":
            print('Rolling back Bench "{}"'.format(path))
            if os.path.exists(path):
                shutil.rmtree(path)
示例#8
0
def init(path, apps_path, frappe_path, frappe_branch, no_procfile, no_backups,
         no_auto_update, clone_from, verbose, skip_bench_mkdir,
         skip_redis_config_generation):
    "Create a new bench"
    from bench.utils import init
    init(path,
         apps_path=apps_path,
         no_procfile=no_procfile,
         no_backups=no_backups,
         no_auto_update=no_auto_update,
         frappe_path=frappe_path,
         frappe_branch=frappe_branch,
         verbose=verbose,
         clone_from=clone_from,
         skip_bench_mkdir=skip_bench_mkdir,
         skip_redis_config_generation=skip_redis_config_generation)
    click.echo('Bench {} initialized'.format(path))