aboutsummaryrefslogtreecommitdiffstats
path: root/.travis/targets/github-lambda.sh
diff options
context:
space:
mode:
Diffstat (limited to '.travis/targets/github-lambda.sh')
-rw-r--r--.travis/targets/github-lambda.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/.travis/targets/github-lambda.sh b/.travis/targets/github-lambda.sh
new file mode 100644
index 0000000..a92d586
--- /dev/null
+++ b/.travis/targets/github-lambda.sh
@@ -0,0 +1,33 @@
+build() {
+ pushd build > /dev/null
+ ../configure \
+ CFLAGS="-Wall -g -O0" \
+ --enable-ronn \
+ --disable-silent-rules \
+ --enable-tests \
+ --enable-valgrind \
+ --enable-git-receiver \
+ --enable-make-embedded \
+ --enable-runserver
+ popd > /dev/null
+
+ make -C build LDFLAGS="-all-static" blogc
+
+ rm -rf build/root
+ mkdir -p build/root
+
+ PV="$(grep PACKAGE_VERSION build/config.h | cut -d\" -f2)"
+
+ install -m 755 build/blogc build/root/blogc
+ install -m 644 src/blogc-github-lambda/lambda_function.py build/root/lambda_function.py
+ install -m 644 LICENSE build/root/LICENSE
+ strip build/root/blogc
+
+ pushd build/root/ > /dev/null
+ zip -rq "../blogc-github-lambda-${PV}.zip" *
+ popd > /dev/null
+}
+
+deploy() {
+ FILES=( build/*.zip )
+}