[projects/git-slug: 57/170] Run mailistnotification in post-receive
glen
glen at pld-linux.org
Mon Sep 21 21:43:36 CEST 2015
commit 4da8ec02e6d8e5692d766272f6308b6cc5b1dfa7
Author: Kacper Kornet <draenog at pld-linux.org>
Date: Wed Sep 21 13:33:04 2011 +0200
Run mailistnotification in post-receive
post-receive | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/post-receive b/post-receive
index 531348b..751ad3a 100755
--- a/post-receive
+++ b/post-receive
@@ -3,6 +3,7 @@
import fcntl
import os
import sys
+import subprocess
from git_slug.refsdata import RemoteRefsData
from git_slug.gitconst import REFREPO, REFFILE
@@ -11,6 +12,11 @@ from git_slug.gitrepo import GitRepo
data = sys.stdin.readlines()
+mail = subprocess.Popen(["./hooks/mailnotification"], stdin=subprocess.PIPE)
+for line in data:
+ mail.stdin.write(line.encode('utf-8'))
+mail.communicate()
+
gitrepo = os.environ.get('GL_REPO')
if gitrepo.startswith('packages/'):
gitrepo = gitrepo[len('packages/'):]
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5
More information about the pld-cvs-commit
mailing list