aboutsummaryrefslogtreecommitdiffstats
path: root/.travis/targets/github-lambda.sh
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-02-10 01:21:49 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-02-10 01:21:49 +0100
commitba25922f737076fbcdbd81a01ce91240dca749db (patch)
tree96ecafecd5764ee91141dc99f5c54af218ac0c92 /.travis/targets/github-lambda.sh
parentb4b034d43b81e7f7febc337cc4d0abe114e3bfb5 (diff)
downloadblogc-ba25922f737076fbcdbd81a01ce91240dca749db.tar.gz
blogc-ba25922f737076fbcdbd81a01ce91240dca749db.tar.bz2
blogc-ba25922f737076fbcdbd81a01ce91240dca749db.zip
travis: removed travis dir to .travis
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 )
+}