mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
build assets only once if installing from a list from path
This commit is contained in:
parent
09b0067992
commit
91c2de9afb
@ -30,7 +30,7 @@ def write_appstxt(apps, bench='.'):
|
||||
with open(os.path.join(bench, 'sites', 'apps.txt'), 'w') as f:
|
||||
return f.write('\n'.join(apps))
|
||||
|
||||
def get_app(app, git_url, branch=None, bench='.'):
|
||||
def get_app(app, git_url, branch=None, bench='.', build_assets=True):
|
||||
logger.info('getting app {}'.format(app))
|
||||
shallow_clone = '--depth 1' if check_git_for_shallow_clone() and get_config().get('shallow_clone') else ''
|
||||
branch = '--branch {branch}'.format(branch=branch) if branch else ''
|
||||
@ -42,7 +42,8 @@ def get_app(app, git_url, branch=None, bench='.'):
|
||||
cwd=os.path.join(bench, 'apps'))
|
||||
print 'installing', app
|
||||
install_app(app, bench=bench)
|
||||
build_assets(bench=bench)
|
||||
if build_assets:
|
||||
build_assets(bench=bench)
|
||||
conf = get_config()
|
||||
if conf.get('restart_supervisor_on_update'):
|
||||
restart_supervisor_processes(bench=bench)
|
||||
@ -78,7 +79,8 @@ def get_current_branch(repo_dir):
|
||||
def install_apps_from_path(path, bench='.'):
|
||||
apps = get_apps_json(path)
|
||||
for app in apps:
|
||||
get_app(app['name'], app['url'], branch=app.get('branch'), bench=bench)
|
||||
get_app(app['name'], app['url'], branch=app.get('branch'), bench=bench, build_assets=False)
|
||||
build_assets(bench=bench)
|
||||
|
||||
def get_apps_json(path):
|
||||
if path.startswith('http'):
|
||||
|
Loading…
Reference in New Issue
Block a user