tree_expire = ini.getint("general", "expire")
repo_url = ini.get("repo", "url")
+repo_branch = "master"
+
+if ini.has_option("repo", "branch"):
+ repo_branch = ini.get_option("repo", "branch")
rsync_bin_url = ini.get("rsync", "binary_url")
rsync_bin_key = ini.get("rsync", "binary_password")
if not os.path.isdir(home_dir+'/source.git'):
subprocess.call(["git", "clone", "--depth=1", repo_url, home_dir+'/source.git'])
+ subprocess.call(["git", "checkout", repo_branch], cwd = home_dir+'/source.git')
findtargets = subprocess.Popen([home_dir+'/dumpinfo.pl', 'targets'],
stdout = subprocess.PIPE, cwd = home_dir+'/source.git')
))
# check out the source
- factory.addStep(Git(repourl=repo_url, mode='update'))
+ factory.addStep(Git(repourl=repo_url, branch=repo_branch, mode='update'))
factory.addStep(ShellCommand(
name = "rmtmp",
factory.addStep(ShellCommand(
name = "dldir",
description = "Preparing dl/",
- command = "mkdir -p $HOME/dl && ln -sf $HOME/dl ./dl",
+ command = "mkdir -p $HOME/dl && rm -rf ./dl && ln -sf $HOME/dl ./dl",
logEnviron = False,
want_stdout = False
))