aboutsummaryrefslogtreecommitdiff
path: root/kernelci
diff options
context:
space:
mode:
authorGuillaume Tucker <guillaume.tucker@collabora.com>2019-04-19 09:13:13 +0100
committerGuillaume Tucker <guillaume.tucker@collabora.com>2019-05-03 12:59:46 +0100
commit6788e9f55e6eff330c3e375c99d206ed83159b3d (patch)
tree4215d6f03a1e70e5e2fbde8975e6e14ab1334041 /kernelci
parent9dc7c5a30a9579945c67e22ea4e81cc75208abe4 (diff)
kernelci.build: drop config object in git_describe functions
It's not required to have a build config object in git_describe(), git_describe_verbose() and head_commit() so remove it from the arguments and update kci_build accordingly. The git_describe() function still requires the tree name for special cases though. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'kernelci')
-rw-r--r--kernelci/build.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernelci/build.py b/kernelci/build.py
index 774915f..4e0bbc1 100644
--- a/kernelci/build.py
+++ b/kernelci/build.py
@@ -128,7 +128,7 @@ git checkout --detach {remote}/{branch}
""".format(path=path, remote=config.tree.name, branch=config.branch))
-def head_commit(config, path):
+def head_commit(path):
cmd = """\
cd {path} &&
git log --pretty=format:%H -n1
@@ -138,8 +138,8 @@ git log --pretty=format:%H -n1
return commit.strip()
-def git_describe(config, path):
- describe_args = "--match=v\*" if config.tree.name == "arm-soc" else ""
+def git_describe(tree_name, path):
+ describe_args = "--match=v\*" if tree_name == "arm-soc" else ""
cmd = """\
cd {path} && \
git describe {describe_args} \
@@ -149,7 +149,7 @@ git describe {describe_args} \
return describe.strip().replace('/', '_')
-def git_describe_verbose(config, path):
+def git_describe_verbose(path):
cmd = """\
cd {path} &&
git describe --match=v[1-9]\* \
@@ -200,7 +200,7 @@ def generate_fragments(config, kdir):
def push_tarball(config, kdir, storage, api, token):
tarball_name = "linux-src_{}.tar.gz".format(config.name)
- describe = git_describe(config, kdir)
+ describe = git_describe(config.tree.name, kdir)
tarball_url = '/'.join([
storage, config.tree.name, config.branch, describe, tarball_name])
resp = requests.head(tarball_url)