helm/rake/lib/git.rb
2014-09-05 17:01:52 -04:00

13 lines
258 B
Ruby

include Rake::DSL
def git(url, dest)
unless Dir.exists?("#{dest}/.git")
rm_rf dest if Dir.exists?(dest)
sh "git clone '#{url}' '#{dest}'"
end
end
def github(repo, dest, protocol = "https")
git "#{protocol}://github.com/#{repo}.git", dest
end