Exemple #1
0
def _ensure_galaxy_repository_available(ctx):
    workspace = ctx.workspace
    gx_repo = os.path.join(workspace, "gx_repo")
    if os.path.exists(gx_repo):
        # Attempt fetch - but don't fail if not interweb, etc...
        shell("git --git-dir %s fetch >/dev/null 2>&1" % gx_repo)
    else:
        remote_repo = "https://github.com/galaxyproject/galaxy"
        command = git.command_clone(ctx, remote_repo, gx_repo, bare=True)
        shell(command)
Exemple #2
0
def _ensure_galaxy_repository_available(ctx, kwds):
    workspace = ctx.workspace
    cwl = kwds.get("cwl", False)
    gx_repo = os.path.join(workspace, "gx_repo")
    if cwl:
        gx_repo += "_cwl"
    if os.path.exists(gx_repo):
        # Attempt fetch - but don't fail if not interweb, etc...
        shell("git --git-dir %s fetch >/dev/null 2>&1" % gx_repo)
    else:
        remote_repo = _galaxy_source(kwds)
        command = git.command_clone(ctx, remote_repo, gx_repo, bare=True)
        shell(command)
    return gx_repo
Exemple #3
0
def _ensure_galaxy_repository_available(ctx, kwds):
    workspace = ctx.workspace
    cwl = kwds.get("cwl", False)
    gx_repo = os.path.join(workspace, "gx_repo")
    if cwl:
        gx_repo += "_cwl"
    if os.path.exists(gx_repo):
        # Attempt fetch - but don't fail if not interweb, etc...
        shell("git --git-dir %s fetch >/dev/null 2>&1" % gx_repo)
    else:
        if cwl:
            remote_repo = "https://github.com/common-workflow-language/galaxy"
        else:
            remote_repo = "https://github.com/galaxyproject/galaxy"
        command = git.command_clone(ctx, remote_repo, gx_repo, bare=True)
        shell(command)
    return gx_repo
Exemple #4
0
def _ensure_galaxy_repository_available(ctx, kwds):
    workspace = ctx.workspace
    cwl = kwds.get("cwl", False)
    galaxy_source = kwds.get('galaxy_source')
    if galaxy_source and galaxy_source != DEFAULT_GALAXY_SOURCE:
        sanitized_repo_name = "".join(c if c.isalnum() else '_' for c in kwds['galaxy_source']).rstrip()[:255]
        gx_repo = os.path.join(workspace, "gx_repo_%s" % sanitized_repo_name)
    else:
        gx_repo = os.path.join(workspace, "gx_repo")
    if cwl:
        gx_repo += "_cwl"
    if os.path.exists(gx_repo):
        # Attempt fetch - but don't fail if not interweb, etc...
        shell("git --git-dir %s remote update >/dev/null 2>&1" % gx_repo)
    else:
        remote_repo = _galaxy_source(kwds)
        command = git.command_clone(ctx, remote_repo, gx_repo, mirror=True)
        shell(command)
    return gx_repo
Exemple #5
0
def _install_galaxy_via_git(ctx, config_directory, env, kwds):
    gx_repo = _ensure_galaxy_repository_available(ctx, kwds)
    branch = _galaxy_branch(kwds)
    command = git.command_clone(ctx, gx_repo, "galaxy-dev", branch=branch)
    _install_with_command(ctx, config_directory, command, env, kwds)
Exemple #6
0
def _install_galaxy_via_git(ctx, config_directory, kwds):
    _ensure_galaxy_repository_available(ctx)
    workspace = ctx.workspace
    gx_repo = os.path.join(workspace, "gx_repo")
    command = git.command_clone(ctx, gx_repo, "galaxy-dev")
    _install_with_command(config_directory, command)
Exemple #7
0
def _install_galaxy_via_git(ctx, galaxy_root, env, kwds):
    gx_repo = _ensure_galaxy_repository_available(ctx, kwds)
    branch = _galaxy_branch(kwds)
    command = git.command_clone(ctx, gx_repo, galaxy_root, branch=branch)
    _install_with_command(ctx, command, galaxy_root, env, kwds)
Exemple #8
0
def _install_galaxy_via_git(ctx, galaxy_root, env, kwds):
    gx_repo = _ensure_galaxy_repository_available(ctx, kwds)
    branch = _galaxy_branch(kwds)
    command = git.command_clone(ctx, gx_repo, galaxy_root, branch=branch)
    _install_with_command(ctx, command, galaxy_root, env, kwds)
Exemple #9
0
def _install_galaxy_via_git(ctx, config_directory, env, kwds):
    gx_repo = _ensure_galaxy_repository_available(ctx, kwds)
    branch = _galaxy_branch(kwds)
    command = git.command_clone(ctx, gx_repo, "galaxy-dev", branch=branch)
    _install_with_command(ctx, config_directory, command, env, kwds)
Exemple #10
0
def _install_galaxy_via_git(ctx, config_directory, kwds):
    _ensure_galaxy_repository_available(ctx)
    workspace = ctx.workspace
    gx_repo = os.path.join(workspace, "gx_repo")
    command = git.command_clone(ctx, gx_repo, "galaxy-dev")
    _install_with_command(config_directory, command)