tasks/agent.py
def build_dep_tree(ctx, git_ref=""):
    """
    Generates a file representing the Golang dependency tree in the current
    directory. Use the "--git-ref=X" argument to specify which tag you would like
    to target otherwise current repo state will be used.
    """
    saved_branch = None
    if git_ref:
        print(f"Tag {git_ref} specified. Checking out the branch...")

        result = ctx.run("git rev-parse --abbrev-ref HEAD", hide='stdout')
        saved_branch = result.stdout

        ctx.run(f"git checkout {git_ref}")
    else:
        print("No tag specified. Using the current state of repository.")

    try:
        ctx.run("go run tools/dep_tree_resolver/go_deps.go")
    finally:
        if saved_branch:
            ctx.run(f"git checkout {saved_branch}", hide='stdout')

    Generates a file representing the Golang dependency tree in the current
    directory. Use the "--git-ref=X" argument to specify which tag you would like
    to target otherwise current repo state will be used.
    
Generates a file representing the Golang dependency tree in the current
directory. Use the "--git-ref=X" argument to specify which tag you would like
to target otherwise current repo state will be used.
Generates a file representing the Golang dependency tree in the current directory . Use the " -- git - ref = X " argument to specify which tag you would like to target otherwise current repo state will be used .
def build_dep_tree(ctx, git_ref=""):
    saved_branch = None
    if git_ref:
        print(f"Tag {git_ref} specified. Checking out the branch...")
        result = ctx.run("git rev-parse --abbrev-ref HEAD", hide='stdout')
        saved_branch = result.stdout
        ctx.run(f"git checkout {git_ref}")
    else:
        print("No tag specified. Using the current state of repository.")
    try:
        ctx.run("go run tools/dep_tree_resolver/go_deps.go")
    finally:
        if saved_branch:
            ctx.run(f"git checkout {saved_branch}", hide='stdout')
def build_dep_tree ( ctx , git_ref = "" ) : saved_branch = None if git_ref : print ( f"Tag {git_ref} specified. Checking out the branch..." ) result = ctx . run ( "git rev-parse --abbrev-ref HEAD" , hide = 'stdout' ) saved_branch = result . stdout ctx . run ( f"git checkout {git_ref}" ) else : print ( "No tag specified. Using the current state of repository." ) try : ctx . run ( "go run tools/dep_tree_resolver/go_deps.go" ) finally : if saved_branch : ctx . run ( f"git checkout {saved_branch}" , hide = 'stdout' )
Generates a file representing the Golang dependency tree in the current
directory.
Generates a file representing the Golang dependency tree in the current directory .
"""
    Generates a file representing the Golang dependency tree in the current
    directory. Use the "--git-ref=X" argument to specify which tag you would like
    to target otherwise current repo state will be used.
    """
ctx
git_ref