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

- old
+ new

@@ -2,11 +2,11 @@ module Deploy module Strategies module Git class ForcePush < Base def process - Dir.chdir(self.build_dir) do + Dir.chdir(build_dir) do add_remote_url checkout_branch commit_branch('-f') end end @@ -17,21 +17,21 @@ url = get_remote_url unless File.exist?('.git') `git init` `git remote add origin #{url}` - `git config user.name "#{self.user_name}"` - `git config user.name "#{self.user_email}"` + `git config user.name "#{user_name}"` + `git config user.email "#{user_email}"` else # check if the remote repo has changed unless url == `git config --get remote.origin.url`.chop `git remote rm origin` `git remote add origin #{url}` end # check if the user name has changed - `git config user.name "#{self.user_name}"` unless self.user_name == `git config --get user.name` + `git config user.name "#{user_name}"` unless user_name == `git config --get user.name` # check if the user email has changed - `git config user.email "#{self.user_email}"` unless self.user_email == `git config --get user.email` + `git config user.email "#{user_email}"` unless user_email == `git config --get user.email` end end def get_remote_url remote = self.remote