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