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
credentials: (url, userName) =>
@log.info "Providing credentials: #{url}, #{userName}"
NodeGit.Cred.sshKeyNew userName, @publicSSHKeyPath, @privateSSHKeyPath, ''
pushUpdateReference: (ref, status, data) =>
@log.info "Push result status: #{status}"
# certificateCheck: () ->
# return 1
......@@ -251,17 +254,11 @@ class Builder
NodeGit.Remote.lookup repository, 'origin'
.then (origin) =>
# NodeGit.Remote.initCallbacks @authorisation
origin.push ['refs/heads/master:refs/heads/master'],
{
credentials: @authorisation,
pushUpdateReference: (ref, status, data) ->
@log.debug "Push result status: #{status}"
}
origin.push ['refs/heads/master:refs/heads/master'], @authorisation
# null,
# repository.defaultSignature()
# 'Push to master'
.then (pushResult) =>
@log.debug "site.origin push result: #{pushResult}"
if repositoryPath == app.dataForSiteDirectory
@pushToSite repository
.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