Ejemplo n.º 1
0
def use(ctx, software_root, default, option, without_package, version):
    '''Switch environment to given release version'''
    cmd = Cmd()
    ctx.obj['config_entry']['software_root'] = software_root
    ctx.obj['config_entry']['option'] = parse_lines(option)
    ctx.obj['config_entry']['scenario'] = version
    cmd.execute('use', ctx.obj, default, without_package)
Ejemplo n.º 2
0
def install(ctx, software_root, release_repo, release_source, option, reinstall, update, no_software, force, yes, version):
    '''Install specified release version'''
    cmd = Cmd()
    ctx.obj['config_entry']['software_root'] = software_root
    ctx.obj['config_entry']['release_repo'] = release_repo
    ctx.obj['config_entry']['release_source'] = release_source
    ctx.obj['config_entry']['option'] = parse_lines(option)
    ctx.obj['config_entry']['scenario'] = version
    cmd.execute('install', ctx.obj, reinstall, update, no_software, force, yes)
Ejemplo n.º 3
0
def ls_pkg(ctx):
    '''List all packages of the current release versions'''
    cmd = Cmd('ls-pkg')
    cmd.execute(ctx.obj)
Ejemplo n.º 4
0
def upgrade(ctx):
    '''Upgrade bsm to the latest version'''
    cmd = Cmd()
    cmd.execute('upgrade', ctx.obj)
Ejemplo n.º 5
0
def init(ctx, no_default, show_script):
    '''Initialize bsm environment'''
    cmd = Cmd()
    ctx.obj['config_entry']['default_scenario'] = not no_default
    cmd.execute('init', ctx.obj, no_default, show_script, ctx.obj['output']['shell'])
Ejemplo n.º 6
0
def home(ctx):
    '''Display home directory of bsm'''
    cmd = Cmd()
    cmd.execute('home', ctx.obj)
Ejemplo n.º 7
0
def pkg_edit(ctx, category, subdir, version, option, package):
    '''Edit package configuration'''
    cmd = Cmd()
    ctx.obj['config_entry']['option'] = parse_lines(option)
    cmd.execute('pkg-edit', ctx.obj, category, subdir, version, package)
Ejemplo n.º 8
0
def pkg_path(ctx, category, subdir, version, option, list_all, package):
    '''List package path'''
    cmd = Cmd()
    ctx.obj['config_entry']['option'] = parse_lines(option)
    cmd.execute('pkg-path', ctx.obj, category, subdir, version, list_all, package)
Ejemplo n.º 9
0
def pkg_remove(ctx, category, subdir, version, option, force, package):
    '''Remove a package'''
    cmd = Cmd()
    ctx.obj['config_entry']['option'] = parse_lines(option)
    cmd.execute('pkg-remove', ctx.obj, category, subdir, version, force, package)
Ejemplo n.º 10
0
def current(ctx):
    '''List current release'''
    cmd = Cmd()
    cmd.execute('current', ctx.obj)
Ejemplo n.º 11
0
def default(ctx):
    '''List default release'''
    cmd = Cmd()
    cmd.execute('default', ctx.obj)
Ejemplo n.º 12
0
def ls(ctx, software_root):
    '''List installed release versions'''
    cmd = Cmd()
    ctx.obj['software_root'] = software_root
    cmd.execute('ls', ctx.obj)
Ejemplo n.º 13
0
def ls_remote(ctx, release_repo, list_all, tag):
    '''List all available release versions'''
    cmd = Cmd()
    ctx.obj['release_repo'] = release_repo
    cmd.execute('ls-remote', ctx.obj, list_all, tag)
Ejemplo n.º 14
0
def init(ctx, show_script):
    '''Initialize bsm environment'''
    cmd = Cmd()
    cmd.execute('init', ctx.obj, show_script=show_script, shell=ctx.obj['output']['shell'])
Ejemplo n.º 15
0
def pack(ctx, destination, version):
    '''Create tar packages for the specified release version'''
    cmd = Cmd('pack')
    cmd.execute(ctx.obj, destination=destination, version_name=version)
Ejemplo n.º 16
0
def pkg_use(ctx, category, subdir, version, option, package):
    '''Load a package'''
    cmd = Cmd()
    ctx.obj['config_entry']['option'] = parse_lines(option)
    cmd.execute('pkg-use', ctx.obj, category, subdir, version, package)
Ejemplo n.º 17
0
def pkg_build(ctx, category, subdir, version, option, rebuild, package):
    '''Build a package'''
    cmd = Cmd()
    ctx.obj['config_entry']['option'] = parse_lines(option)
    cmd.execute('pkg-build', ctx.obj, category, subdir, version, rebuild, package)
Ejemplo n.º 18
0
def refresh(ctx, option):
    '''Refresh the current release version environment'''
    cmd = Cmd()
    ctx.obj['config_entry']['option'] = parse_lines(option)
    cmd.execute('refresh', ctx.obj)
Ejemplo n.º 19
0
def pkg_config(ctx, category, subdir, version, option, package):
    '''List package config'''
    cmd = Cmd()
    ctx.obj['config_entry']['option'] = parse_lines(option)
    cmd.execute('pkg-config', ctx.obj, category, subdir, version, package)
Ejemplo n.º 20
0
def run(ctx, option, command):
    '''Run release command'''
    cmd = Cmd()
    ctx.obj['config_entry']['option'] = parse_lines(option)
    cmd.execute('run', ctx.obj, command)
Ejemplo n.º 21
0
def pkg_clean(ctx, package):
    '''Clean a package'''
    cmd = Cmd()
    cmd.execute('pkg-clean', ctx.obj, package)
Ejemplo n.º 22
0
def clean(ctx):
    '''Clean the current release version environment'''
    cmd = Cmd()
    cmd.execute('clean', ctx.obj)
Ejemplo n.º 23
0
def version(ctx):
    '''Display version information'''
    cmd = Cmd()
    cmd.execute('version', ctx.obj)
Ejemplo n.º 24
0
def pkg_ls(ctx, list_all, option, package):
    '''List all packages of the current release versions'''
    cmd = Cmd()
    ctx.obj['config_entry']['option'] = parse_lines(option)
    cmd.execute('pkg-ls', ctx.obj, list_all, package)
Ejemplo n.º 25
0
def setup(ctx, shell):
    '''Get the setup script'''
    cmd = Cmd()
    cmd.execute('setup', ctx.obj, shell)
Ejemplo n.º 26
0
def pkg_init(ctx, package_root, option, yes):
    '''Initialize a new package from directory'''
    cmd = Cmd()
    ctx.obj['config_entry']['option'] = parse_lines(option)
    cmd.execute('pkg-init', ctx.obj, package_root, yes)
Ejemplo n.º 27
0
def exit(ctx, show_script):
    '''Exit bsm environment completely'''
    cmd = Cmd()
    cmd.execute('exit', ctx.obj, show_script, ctx.obj['output']['shell'])
Ejemplo n.º 28
0
def pkg_install(ctx, category, subdir, version, category_origin, subdir_origin, version_origin, package, option, reinstall, yes):
    '''Install specified package'''
    cmd = Cmd()
    ctx.obj['config_entry']['option'] = parse_lines(option)
    ctx.obj['config_entry']['reinstall'] = reinstall
    cmd.execute('pkg-install', ctx.obj, category, subdir, version, category_origin, subdir_origin, version_origin, package, yes)
Ejemplo n.º 29
0
def config(ctx, version, option, config_type, item_list):
    '''Display configuration, mostly for debug purpose'''
    cmd = Cmd()
    ctx.obj['config_entry']['scenario'] = version
    ctx.obj['config_entry']['option'] = parse_lines(option)
    cmd.execute('config', ctx.obj, config_type, item_list)
Ejemplo n.º 30
0
def pkg_install(ctx, package):
    '''Install specified package'''
    cmd = Cmd()
    cmd.execute('pkg-install', ctx.obj)