How to use the tbump.git.run_git_captured function in tbump

To help you get started, we’ve selected a few tbump examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TankerHQ / tbump / tbump / init.py View on Github external
def find_files(working_path: Path, current_version: str) -> List[str]:
    ui.info_2("Looking for files matching", ui.bold, current_version)
    cmd = ["grep", "--fixed-strings", "--files-with-matches", current_version]
    _, out = tbump.git.run_git_captured(working_path, *cmd, check=True)
    res = []  # type: List[str]
    ui.info("Found following matching files")
    for file in out.splitlines():
        ui.info(" * ", file)
        res.append(file)
    return res
github TankerHQ / tbump / tbump / git_bumper.py View on Github external
def run_git_captured(self, *args: str, check: bool = True) -> Tuple[int, str]:
        full_args = [self.repo_path] + list(args)
        return tbump.git.run_git_captured(*full_args, check=check)