Method: Burp::Util.commit

Defined in:
app/lib/burp/util.rb

.commit(message = "auto commit", options = {}) ⇒ Object



10
11
12
13
14
# File 'app/lib/burp/util.rb', line 10

def self.commit(message = "auto commit", options = {})
  options[:path] ||= Burp.content_directory
  raise "missing git repo in burp cms directory" if `cd #{options[:path]}; git st 2>&1`.match(/Not a git repository/)
  `cd #{options[:path]}; git add .; git commit -a -m "Burp: #{message}"`
end