diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-07-20 20:26:42 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-07-20 14:29:44 +0000 |
commit | b662f17582bd6bfd3bacabfceb4250984ced9df7 (patch) | |
tree | 40fc4ec50acd5ab669618f702f91fb998fc77ddd | |
parent | f484ab4f682ca09a2d5679df6309efb28e4b2429 (diff) | |
download | buildstream-b662f17582bd6bfd3bacabfceb4250984ced9df7.tar.gz |
git source plugin: Omit the .git directory completely.
This will break builds which use `git describe` to determine
their version number until a more elegant solution is implemented,
and will unblock work on caching of build trees in the artifacts.
Fixes issue #455
-rw-r--r-- | buildstream/plugins/sources/git.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/buildstream/plugins/sources/git.py b/buildstream/plugins/sources/git.py index d079d8747..d1ea81763 100644 --- a/buildstream/plugins/sources/git.py +++ b/buildstream/plugins/sources/git.py @@ -163,6 +163,9 @@ class GitMirror(): fail="Failed to checkout git ref {}".format(self.ref), cwd=fullpath) + # Remove .git dir + shutil.rmtree(os.path.join(fullpath, ".git")) + def init_workspace(self, directory): fullpath = os.path.join(directory, self.path) |