Verified Commit 89217691 authored by Aral Balkan's avatar Aral Balkan
Browse files

Fix code to get git push status

parent 20da9e62
...@@ -75,6 +75,9 @@ class Builder ...@@ -75,6 +75,9 @@ class Builder
credentials: (url, userName) => credentials: (url, userName) =>
@log.info "Providing credentials: #{url}, #{userName}" @log.info "Providing credentials: #{url}, #{userName}"
NodeGit.Cred.sshKeyNew userName, @publicSSHKeyPath, @privateSSHKeyPath, '' NodeGit.Cred.sshKeyNew userName, @publicSSHKeyPath, @privateSSHKeyPath, ''
pushUpdateReference: (ref, status, data) =>
@log.info "Push result status: #{status}"
# certificateCheck: () -> # certificateCheck: () ->
# return 1 # return 1
...@@ -251,17 +254,11 @@ class Builder ...@@ -251,17 +254,11 @@ class Builder
NodeGit.Remote.lookup repository, 'origin' NodeGit.Remote.lookup repository, 'origin'
.then (origin) => .then (origin) =>
# NodeGit.Remote.initCallbacks @authorisation # NodeGit.Remote.initCallbacks @authorisation
origin.push ['refs/heads/master:refs/heads/master'], origin.push ['refs/heads/master:refs/heads/master'], @authorisation
{ # null,
credentials: @authorisation, # repository.defaultSignature()
pushUpdateReference: (ref, status, data) -> # 'Push to master'
@log.debug "Push result status: #{status}"
}
# null,
# repository.defaultSignature()
# 'Push to master'
.then (pushResult) => .then (pushResult) =>
@log.debug "site.origin push result: #{pushResult}"
if repositoryPath == app.dataForSiteDirectory if repositoryPath == app.dataForSiteDirectory
@pushToSite repository @pushToSite repository
.then => .then =>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment