lib/middleman-deploy/strategies/git/base.rb in middleman-deploy-0.2.3 vs lib/middleman-deploy/strategies/git/base.rb in middleman-deploy-0.2.4

- old
+ new

@@ -1,16 +1,17 @@ module Middleman module Deploy module Strategies module Git class Base - attr_accessor :branch, :build_dir, :remote + attr_accessor :branch, :build_dir, :remote, :commit_message - def initialize(build_dir, remote, branch) - self.branch = branch - self.build_dir = build_dir - self.remote = remote + def initialize(build_dir, remote, branch, commit_message) + self.branch = branch + self.build_dir = build_dir + self.remote = remote + self.commit_message = commit_message end def process raise NotImplementedError end @@ -32,10 +33,10 @@ `git checkout -b #{self.branch}` end end def commit_branch(options='') - message = add_signature_to_commit_message('Automated commit') + message = self.commit_message ? self.commit_message : add_signature_to_commit_message('Automated commit') `git add -A` `git commit --allow-empty -am "#{message}"` `git push #{options} origin #{self.branch}` end