Explorar el Código

[BUG] fixed, changed to --restore, reset is a flag for test_runner

version-14
Achilles Rasquinha hace 7 años
padre
commit
9416df270d
Se han modificado 2 ficheros con 7 adiciones y 7 borrados
  1. +4
    -4
      frappe/build.py
  2. +3
    -3
      frappe/commands/utils.py

+ 4
- 4
frappe/build.py Ver fichero

@@ -26,12 +26,12 @@ def setup():
except ImportError: pass
app_paths = [os.path.dirname(pymodule.__file__) for pymodule in pymodules]

def bundle(no_compress, make_copy=False, reset=False, verbose=False):
def bundle(no_compress, make_copy=False, restore=False, verbose=False):
"""concat / minify js files"""
# build js files
setup()

make_asset_dirs(make_copy=make_copy, reset = reset)
make_asset_dirs(make_copy=make_copy, restore=restore)

# new nodejs build system
command = 'node --use_strict ../apps/frappe/frappe/build.js --build'
@@ -61,7 +61,7 @@ def watch(no_compress):

# time.sleep(3)

def make_asset_dirs(make_copy=False, reset=False):
def make_asset_dirs(make_copy=False, restore=False):
# don't even think of making assets_path absolute - rm -rf ahead.
assets_path = os.path.join(frappe.local.sites_path, "assets")
for dir_path in [
@@ -83,7 +83,7 @@ def make_asset_dirs(make_copy=False, reset=False):
for source, target in symlinks:
source = os.path.abspath(source)
if os.path.exists(source):
if reset:
if restore:
if os.path.exists(target):
if os.path.islink(target):
os.unlink(target)


+ 3
- 3
frappe/commands/utils.py Ver fichero

@@ -7,14 +7,14 @@ from frappe.commands import pass_context, get_site

@click.command('build')
@click.option('--make-copy', is_flag=True, default=False, help='Copy the files instead of symlinking')
@click.option('--reset', is_flag=True, default=False, help='Copy the files instead of symlinking with force')
@click.option('--restore', is_flag=True, default=False, help='Copy the files instead of symlinking with force')
@click.option('--verbose', is_flag=True, default=False, help='Verbose')
def build(make_copy=False, reset = False, verbose=False):
def build(make_copy=False, restore = False, verbose=False):
"Minify + concatenate JS and CSS files, build translations"
import frappe.build
import frappe
frappe.init('')
frappe.build.bundle(False, make_copy=make_copy, reset = reset, verbose=verbose)
frappe.build.bundle(False, make_copy=make_copy, restore = restore, verbose=verbose)

@click.command('watch')
def watch():


Cargando…
Cancelar
Guardar