Set GIT_DIR when staging git clones

Some build scripts want to inspect the git history, e.g. to determine
version strings. Rather than copy the repository into the build tree,
just setting GIT_DIR is enough for things to "just work".

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-02-28 18:32:29 -06:00
parent 571aff35e7
commit 6fe29922c8

View File

@ -383,6 +383,7 @@ class GitDownloadStrategy < AbstractDownloadStrategy
safe_system 'git', 'submodule', '--quiet', 'foreach', '--recursive', sub_cmd
end
end
ENV['GIT_DIR'] = cached_location+'.git'
end
end