-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e0ebf97
commit 8d35c8f
Showing
9 changed files
with
18 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,33 +8,31 @@ def run_cmd(cmd: str, | |
cwd: Path, | ||
print_output: bool = True, | ||
no_throw: bool = False) -> Tuple[int, str]: | ||
error_log = "" | ||
stdout = "" | ||
print(f"[run_cmd] Running: {cmd} from {cwd}") | ||
|
||
ret = subprocess.run(cmd, | ||
shell=True, | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.STDOUT, | ||
universal_newlines=True, | ||
cwd=cwd) | ||
if no_throw is False and ret.returncode: | ||
print(f"[run_cmd] Error {ret.returncode} raised while running cmd: {cmd}") | ||
print("[run_cmd] Output was:") | ||
print(ret.stdout) | ||
raise ValueError() | ||
cwd=cwd, | ||
check=not no_throw) | ||
|
||
if ret.returncode: | ||
print(f"[run_cmd] Output:\n{ret.stdout}") | ||
|
||
error_log = f''' | ||
stdout = f''' | ||
############################################################################### | ||
[run_cmd] Running: {cmd} from {cwd}" | ||
############################################################################### | ||
''' + ret.stdout | ||
return ret.returncode, error_log | ||
else: | ||
stdout = ret.stdout.strip() | ||
|
||
return ret.returncode, stdout | ||
|
||
|
||
def git_setup(repo_name: str, repo_ref: str, repo_url: str, workdir: Path): | ||
def git_setup(repo_name: str, repo_ref: str, repo_url: str, workdir: Path) -> None: | ||
# Force clone in https over SSH | ||
GIT_CONFIG = ' -c url."https://github.com/".insteadOf="[email protected]:" -c url."https://".insteadOf="git://"' | ||
|
||
|