Commit 700cf4ca authored by Mattia Rizzolo's avatar Mattia Rizzolo

move the website checkout inside a build/ directory

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 863957a9
......@@ -229,27 +229,27 @@ class Branch:
# Update the bare git repository and checkout the branch
subprocess.call([
"git", "clone", "--depth", "1", "--branch", self.name, git_url,
str(branch),
str(branch / "build"),
], stdout=log_file.open("a"), stderr=subprocess.STDOUT)
# Get the commit of the branch
commit_file = branch / "commit"
subprocess.call([
"git", "--git-dir", str(branch / ".git"), "rev-parse",
"git", "--git-dir", str(branch / "build" / ".git"), "rev-parse",
self.name
], stdout=commit_file.open("w"), stderr=log_file.open("a"))
self.update_status("running")
# Copy and load the configuration file
if not (branch / "managetests.json").exists():
if not (branch / "build" / "managetests.json").exists():
log("[!] No managetests.json found in the branch!")
log("[!] Aborting!")
return False
shutil.copy(
str(branch / "managetests.json"),
str(branch / "config.json")
str(branch / "build" / "managetests.json"),
str(branch / "managetests.json")
)
self.load_config()
......
......@@ -29,7 +29,7 @@ class GitLabAPI:
def call(self, method, endpoint, params=None, data=None):
"""Make a raw call to the GitLab API"""
if params is not None:
if params is None:
params = {}
if data is None:
data = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment