Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

48 lines (43 sloc) 1.355 kB
def git_task(name, cmd = nil)
cmd ||= yield if block_given?
cmd ||= name
desc "git #{name} for %s"
project_task(name) do
puts '', '#'*80, "# #{subproject.name}"
if File.exist? subproject.name then system "cd #{subproject.name}; git #{cmd}; cd .."
else $stderr.puts "# missing"
end
end
end
def commit
"commit -a -m #{ENV['message'].to_s.inspect}"
end
def tag
"tag -a #{ENV['tag'].to_s.inspect} -m #{ENV['tag'].to_s.inspect}"
end
namespace :git do
namespace :big_band do
task(:header) { puts '', '#'*80, "# BigBand" }
task(:status => :header) { system "git status" }
task(:pull => :header) { system "git pull --no-ff" }
task(:push => :header) { system "git push" }
task(:diff => :header) { system "git diff" }
task(:tags => :header) { system "git push --tags" }
task(:commit => :header) { system "git #{commit}" }
task(:tag => :header) { system "git #{tag}" }
end
task :status => "big_band:status"
task :pull => "big_band:pull"
task :push => "big_band:push"
task :diff => "big_band:diff"
task :tags => "big_band:tags"
end
project_namespace :git do
git_task :status
git_task :pull, "pull --no-ff"
git_task :push
git_task :diff
git_task :tags, "push --tags"
git_task(:commit) { commit }
git_task(:tag) { tag }
end
Jump to Line
Something went wrong with that request. Please try again.