diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-07-20 20:26:42 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-07-20 21:12:16 +0900 |
commit | 00ea3c16190861bc1395d2a04dd8588f8ae5fd31 (patch) | |
tree | a59c943cbd6b85c4294c1392b82804b7f77b729b | |
parent | 885afe8df3ddf6c4c8434820cb52fb6913007b1e (diff) | |
download | buildstream-tristan/remove-history-from-build-trees.tar.gz |
git source plugin: Omit the .git directory completely.tristan/remove-history-from-build-trees
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.
-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) |