Skip to content

Commit 8e81935

Browse files
arschlesAaron Schlesinger
authored andcommitted
fix(git.go): call the builder binary with git-receive
instead of the receiver and builder scripts
1 parent 1c692c5 commit 8e81935

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

pkg/git/git.go

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,27 @@ do
3535
trap 'rm -f "$LOCKFILE"; exit 1' INT TERM EXIT
3636
3737
# check for authorization on this repo
38-
{{.GitHome}}/receiver "$RECEIVE_REPO" "$newrev" "$RECEIVE_USER" "$RECEIVE_FINGERPRINT"
39-
rc=$?
40-
if [[ $rc != 0 ]] ; then
41-
echo " ERROR: failed on rev $newrev - push denied"
42-
exit $rc
43-
fi
38+
#{{.GitHome}}/receiver "$RECEIVE_REPO" "$newrev" "$RECEIVE_USER" "$RECEIVE_FINGERPRINT"
39+
#rc=$?
40+
#if [[ $rc != 0 ]] ; then
41+
#echo " ERROR: failed on rev $newrev - push denied"
42+
#exit $rc
43+
#fi
4444
# builder assumes that we are running this script from $GITHOME
4545
cd {{.GitHome}}
4646
# if we're processing a receive-pack on an existing repo, run a build
4747
if [[ $SSH_ORIGINAL_COMMAND == git-receive-pack* ]]; then
48-
{{.GitHome}}/builder "$RECEIVE_USER" "$RECEIVE_REPO" "$newrev" 2>&1 | strip_remote_prefix
48+
#{{.GitHome}}/builder "$RECEIVE_USER" "$RECEIVE_REPO" "$newrev" 2>&1 | strip_remote_prefix
49+
50+
GIT_HOME={{.GitHome}} \
51+
SSH_CONNECTION= \
52+
SSH_ORIGINAL_COMMAND=$SSH_ORIGINAL_COMMAND \
53+
REPOSITORY=$RECEIVE_REPO \
54+
SHA= $newrev \
55+
USERNAME=$RECEIVE_USER \
56+
FINGERPRINT=$RECEIVE_FINGERPRINT \
57+
POD_NAMESPACE=$POD_NAMESPACE \
58+
/bin/boot git-receive
4959
fi
5060
5161
rm -f "$LOCKFILE"

0 commit comments

Comments
 (0)