lib/middleman-deploy/strategies/git/submodule.rb in middleman-deploy-1.0.0 vs lib/middleman-deploy/strategies/git/submodule.rb in middleman-deploy-2.0.0.pre.alpha

- old
+ new

@@ -2,11 +2,11 @@ module Deploy module Strategies module Git class Submodule < Base def process - Dir.chdir(self.build_dir) do + Dir.chdir(build_dir) do checkout_branch pull_submodule commit_branch end @@ -17,22 +17,22 @@ def commit_submodule current_branch = `git rev-parse --abbrev-ref HEAD` message = add_signature_to_commit_message('Deployed') - `git add #{self.build_dir}` + `git add #{build_dir}` `git commit --allow-empty -m "#{message}"` `git push origin #{current_branch}` end def pull_submodule `git fetch` `git stash` - `git rebase #{self.remote}/#{self.branch}` + `git rebase #{remote}/#{branch}` `git stash pop` - if $?.exitstatus == 1 - puts "Can't deploy! Please resolve conflicts. Then process to manual commit and push on #{self.branch} branch." + if $CHILD_STATUS.exitstatus == 1 + puts "Can't deploy! Please resolve conflicts. Then process to manual commit and push on #{branch} branch." exit end end end end