aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-03-22 21:41:02 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-03-22 21:42:08 +0100
commitd60fa3735f6a0111c7e2cdbfb5a2c634d91212aa (patch)
tree38362e133da341fa280c8c4ae48a73f8b77401ad
parent2b485906cfa6d2e0431b0fa0120e1c267074b4e8 (diff)
downloadblogc-d60fa3735f6a0111c7e2cdbfb5a2c634d91212aa.tar.gz
blogc-d60fa3735f6a0111c7e2cdbfb5a2c634d91212aa.tar.bz2
blogc-d60fa3735f6a0111c7e2cdbfb5a2c634d91212aa.zip
github-lambda: added blogc version information
-rw-r--r--.gitignore1
-rw-r--r--configure.ac1
-rw-r--r--src/blogc-github-lambda/lambda_function.py.in (renamed from src/blogc-github-lambda/lambda_function.py)3
3 files changed, 5 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index a530082..1a95a3f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -99,6 +99,7 @@ blogc-*.rpm
/src/blogc-github-lambda/LICENSE
/src/blogc-github-lambda/*.pyc
/src/blogc-github-lambda/*.pyo
+/src/blogc-github-lambda/*.py
/build/
/root/
diff --git a/configure.ac b/configure.ac
index 532f281..dec5c3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -222,6 +222,7 @@ LT_LIB_M
AC_CONFIG_FILES([
Makefile
blogc.spec
+ src/blogc-github-lambda/lambda_function.py
])
AC_CONFIG_FILES([tests/blogc/check_blogc.sh],
[chmod +x tests/blogc/check_blogc.sh])
diff --git a/src/blogc-github-lambda/lambda_function.py b/src/blogc-github-lambda/lambda_function.py.in
index 3f41eeb..cafb7c4 100644
--- a/src/blogc-github-lambda/lambda_function.py
+++ b/src/blogc-github-lambda/lambda_function.py.in
@@ -21,6 +21,8 @@ import tarfile
import urllib2
import shutil
+BLOGC_VERSION = '@PACKAGE_VERSION@'
+
cwd = os.path.dirname(os.path.abspath(__file__))
os.environ['PATH'] = '%s:%s' % (cwd, os.environ.get('PATH', ''))
@@ -150,6 +152,7 @@ def sync_s3(src, dest, settings_file):
def sns_handler(message):
+ print 'blogc-github-lambda %s' % BLOGC_VERSION
payload = json.loads(message)
if payload['ref'] == 'refs/heads/master':