lib/dpl/provider.rb in dpl-1.5.0.travis.164.2 vs lib/dpl/provider.rb in dpl-1.5.0.travis.166.2
- old
+ new
@@ -68,10 +68,11 @@
alternatives.any? ? option(*alternatives) : raise(Error, "missing #{name}")
end
end
def deploy
+ setup_git_credentials
rm_rf ".dpl"
mkdir_p ".dpl"
context.fold("Preparing deploy") do
check_auth
@@ -124,9 +125,14 @@
def check_app
end
def create_key(file)
context.shell "ssh-keygen -t rsa -N \"\" -C #{option(:key_name)} -f #{file}"
+ end
+
+ def setup_git_credentials
+ context.shell "git config user.email >/dev/null 2>/dev/null || git config user.email `whoami`@localhost"
+ context.shell "git config user.name >/dev/null 2>/dev/null || git config user.name `whoami`@localhost"
end
def setup_git_ssh(path, key_path)
key_path = File.expand_path(key_path)
path = File.expand_path(path)