clean working dir after build
This commit is contained in:
10
master.py
10
master.py
@@ -64,6 +64,9 @@ def build(pkgbuild: str, repo: str, todo: dict) -> None:
|
||||
with open(os.path.join(config["basedir"]["repo"], "logs", repo, name + ".log"), "w") as log:
|
||||
log.write(res.stdout.decode(errors="ignore"))
|
||||
|
||||
logging.debug("[GIT] %s", subprocess.run(["git", "clean", "-xdff"], check=False, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT).stdout.decode(errors="ignore"))
|
||||
|
||||
return
|
||||
|
||||
# signing
|
||||
@@ -74,6 +77,8 @@ def build(pkgbuild: str, repo: str, todo: dict) -> None:
|
||||
if s_res.returncode:
|
||||
logging.error("[%s/%s/%s] Signing failed: %s", process_name, repo, name,
|
||||
s_res.stdout.decode(errors="ignore"))
|
||||
logging.debug("[GIT] %s", subprocess.run(["git", "clean", "-xdff"], check=False, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT).stdout.decode(errors="ignore"))
|
||||
return
|
||||
|
||||
# copying
|
||||
@@ -84,6 +89,9 @@ def build(pkgbuild: str, repo: str, todo: dict) -> None:
|
||||
os.path.join(config["basedir"]["repo"], repo, "os", config["arch"] + "/"))
|
||||
shutil.copy2(pkg, os.path.join(config["basedir"]["repo"], repo, "os", config["arch"] + "/"))
|
||||
|
||||
logging.debug("[GIT] %s", subprocess.run(["git", "clean", "-xdff"], check=False, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT).stdout.decode(errors="ignore"))
|
||||
|
||||
# repo
|
||||
logging.debug("[%s/%s/%s] Adding packages to todo list: %s", process_name, repo, name,
|
||||
", ".join(glob.glob("*.pkg.tar.zst")))
|
||||
@@ -237,7 +245,7 @@ def update_svn2git() -> None:
|
||||
errors="ignore"))
|
||||
else:
|
||||
os.chdir(git_path)
|
||||
logging.debug("[GIT] %s", subprocess.run(["git", "clean", "-xdf"], check=False, stdout=subprocess.PIPE,
|
||||
logging.debug("[GIT] %s", subprocess.run(["git", "clean", "-xdff"], check=False, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT).stdout.decode(errors="ignore"))
|
||||
logging.debug("[GIT] %s", subprocess.run(["git", "reset", "--hard"], check=True, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT).stdout.decode(errors="ignore"))
|
||||
|
Reference in New Issue
Block a user