Fetch new tags for git repos when cached.

This commit is contained in:
Adam Vandenberg 2010-09-13 15:00:54 -07:00
parent 2f438179a7
commit d518fca81c

View File

@ -257,7 +257,11 @@ class GitDownloadStrategy <AbstractDownloadStrategy
safe_system 'git', 'clone', @url, @clone # indeed, leave it verbose
else
puts "Updating #{@clone}"
Dir.chdir(@clone) { quiet_safe_system 'git', 'fetch', @url }
Dir.chdir(@clone) do
quiet_safe_system 'git', 'fetch', @url
# If we're going to checkout a tag, then we need to fetch new tags too.
quiet_safe_system 'git', 'fetch', '--tags' if @spec == :tag
end
end
end