This plugin copies designated files to a git branch. This is useful for dealing with situations like GitHub’s gh-pages branch for hosting project websites.
A poor design copied from the Git project itself.
# File lib/plugins/syckle/grancher.rb, line 64 def grancher @grancher ||= ::Grancher.new do |g| g.branch = branch g.push_to = remote #g.repo = repo if repo # defaults to '.' g.keep(*keep) if keep g.keep_all if keep_all #g.message = (quiet? ? '' : 'Tranferred site files to #{branch}.') sitemap.each do |(src, dest)| trace "transfer: #{src} => #{dest}" dest = nil if dest == '.' if directory?(src) dest ? g.directory(src, dest) : g.directory(src) else dest ? g.file(src, dest) : g.file(src) end end end end
# File lib/plugins/syckle/grancher.rb, line 97 def release require 'grancher' grancher.push report "Pushed site files to #{remote}." end
Generated with the Darkfish Rdoc Generator 2.