aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-github-lambda
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-13 22:56:13 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-13 22:56:23 +0100
commit87163311e2e86e28f49661ef12cab55b210ae182 (patch)
tree7d522a033756c1dc553d72ab133a92876467958c /src/blogc-github-lambda
parent25c2312e39c64e381997bd15c6f03164f3d78168 (diff)
downloadblogc-87163311e2e86e28f49661ef12cab55b210ae182.tar.gz
blogc-87163311e2e86e28f49661ef12cab55b210ae182.tar.bz2
blogc-87163311e2e86e28f49661ef12cab55b210ae182.zip
lambda: add more dependencies
Diffstat (limited to 'src/blogc-github-lambda')
-rw-r--r--src/blogc-github-lambda/lambda_function.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/blogc-github-lambda/lambda_function.py b/src/blogc-github-lambda/lambda_function.py
index 69ad395..9320544 100644
--- a/src/blogc-github-lambda/lambda_function.py
+++ b/src/blogc-github-lambda/lambda_function.py
@@ -23,6 +23,9 @@ import shutil
cwd = os.path.dirname(os.path.abspath(__file__))
+os.environ['PATH'] = '%s:%s' % (os.path.join(cwd, 'bin'),
+ os.environ.get('PATH', ''))
+
GITHUB_AUTH = os.environ.get('GITHUB_AUTH')
if GITHUB_AUTH is not None and ':' not in GITHUB_AUTH:
GITHUB_AUTH = boto3.client('kms').decrypt(
@@ -141,8 +144,9 @@ def lambda_handler(event, context):
repo_name = payload['repository']['name']
repo_full_name = payload['repository']['full_name']
rootdir = get_tarball(repo_full_name)
- rv = subprocess.call(['make', '-C', rootdir, 'OUTPUT_DIR=_build',
- 'BLOGC=%s' % os.path.join(cwd, 'blogc')],
+ rv = subprocess.call([os.path.join(cwd, 'bin', 'make'), '-C', rootdir,
+ 'OUTPUT_DIR=_build',
+ 'BLOGC=%s' % os.path.join(cwd, 'bin', 'blogc')],
stdout=None if debug else subprocess.PIPE,
stderr=None if debug else subprocess.PIPE)
if rv != 0: