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

changed parameter name

This commit is contained in:
Shridhar Patil 2019-12-20 17:20:28 +05:30
parent b005720a2b
commit a65e9f09dc
3 changed files with 7 additions and 7 deletions

View File

@ -92,7 +92,7 @@ def remove_from_excluded_apps_txt(app, bench_path='.'):
apps.remove(app) apps.remove(app)
return write_excluded_apps_txt(apps, bench_path=bench_path) return write_excluded_apps_txt(apps, bench_path=bench_path)
def get_app(git_url, branch=None, bench_path='.', build_asset_files=True, verbose=False, def get_app(git_url, branch=None, bench_path='.', skip_assets=False, verbose=False,
postprocess = True): postprocess = True):
# from bench.utils import check_url # from bench.utils import check_url
try: try:
@ -137,7 +137,7 @@ def get_app(git_url, branch=None, bench_path='.', build_asset_files=True, verbos
if postprocess: if postprocess:
if build_asset_files: if not skip_assets:
build_assets(bench_path=bench_path, app=app_name) build_assets(bench_path=bench_path, app=app_name)
conf = get_config(bench_path=bench_path) conf = get_config(bench_path=bench_path)
@ -412,7 +412,7 @@ def get_major_version(version):
def install_apps_from_path(path, bench_path='.'): def install_apps_from_path(path, bench_path='.'):
apps = get_apps_json(path) apps = get_apps_json(path)
for app in apps: for app in apps:
get_app(app['url'], branch=app.get('branch'), bench_path=bench_path, build_asset_files=False) get_app(app['url'], branch=app.get('branch'), bench_path=bench_path, skip_assets=True)
def get_apps_json(path): def get_apps_json(path):
if path.startswith('http'): if path.startswith('http'):

View File

@ -35,11 +35,11 @@ def init(path, apps_path, frappe_path, frappe_branch, no_procfile, no_backups,
@click.argument('name', nargs=-1) # Dummy argument for backward compatibility @click.argument('name', nargs=-1) # Dummy argument for backward compatibility
@click.argument('git-url') @click.argument('git-url')
@click.option('--branch', default=None, help="branch to checkout") @click.option('--branch', default=None, help="branch to checkout")
@click.option('--skip-assets', is_flag=True, default=True, help="Do not build assets") @click.option('--skip-assets', is_flag=True, default=False, help="Do not build assets")
def get_app(git_url, branch, name=None, skip_assets=True): def get_app(git_url, branch, name=None, skip_assets=False):
"clone an app from the internet and set it up in your bench" "clone an app from the internet and set it up in your bench"
from bench.app import get_app from bench.app import get_app
get_app(git_url, branch=branch, build_asset_files=skip_assets) get_app(git_url, branch=branch, skip_assets=skip_assets)
@click.command('new-app') @click.command('new-app')

View File

@ -72,7 +72,7 @@ def init(path, apps_path=None, no_procfile=False, no_backups=False,
if not frappe_path: if not frappe_path:
frappe_path = 'https://github.com/frappe/frappe.git' frappe_path = 'https://github.com/frappe/frappe.git'
get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose) get_app(frappe_path, branch=frappe_branch, bench_path=path, skip_assets=True, verbose=verbose)
if apps_path: if apps_path:
install_apps_from_path(apps_path, bench_path=path) install_apps_from_path(apps_path, bench_path=path)