Skip to content

Commit ca39d9e

Browse files
authored
Merge pull request #7 from suhay/1-status-url
Setting up some zombie killers
2 parents 2b85ef8 + abe36e7 commit ca39d9e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ my-site.json
4444

4545
### Adding listener to GitHub Webhooks
4646

47+
` - Only the `release` event is supported.
48+
=======
4749
As of `v0.2.1` - Only the `release` event is supported.
4850

4951
`https://{domain}/webhooks/{repo}`

src/release.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,15 @@ def processRelease(repo, payload):
4646
subprocess.check_call(['git', 'fetch', '--all', '--tags'], cwd=data['path'])
4747
subprocess.check_call(['git', 'checkout', 'tags/' + payload['release']['tag_name']], cwd=data['path'])
4848

49-
with subprocess.Popen(' && '.join(commands), cwd=data['path'], executable='/bin/bash', shell=True) as process:
49+
with subprocess.Popen(' && '.join(commands), cwd=data['path'], executable='/bin/bash', shell=True, stdout=subprocess.PIPE) as process:
5050
try:
5151
process.communicate(timeout=300)
52+
while True:
53+
line = process.stdout.readline()
54+
if line == '' and process.poll() is not None:
55+
break
56+
if line:
57+
print(line.rstrip())
5258
except subprocess.TimeoutExpired:
5359
print('Process was killed by timeout: 300 seconds')
5460
raise

0 commit comments

Comments
 (0)