aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux/travis-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux/travis-build.sh')
-rwxr-xr-xbuild-aux/travis-build.sh29
1 files changed, 23 insertions, 6 deletions
diff --git a/build-aux/travis-build.sh b/build-aux/travis-build.sh
index 8725a0b..223d145 100755
--- a/build-aux/travis-build.sh
+++ b/build-aux/travis-build.sh
@@ -2,16 +2,15 @@
set -ex
-if [[ "x${TARGET}" = "xblogc-github-lambda" ]]; then
- build-aux/travis-build-github-lambda.sh
- exit $?
-fi
-
MAKE_CONFIGURE="--enable-make"
if [[ "x${TARGET}" = "xblogc-make-embedded" ]]; then
MAKE_CONFIGURE="--enable-make-embedded"
TARGET="check"
fi
+if [[ "x${TARGET}" = "xblogc-github-lambda" ]]; then
+ MAKE_CONFIGURE="--enable-make-embedded"
+fi
+
rm -rf build
mkdir -p build
@@ -28,4 +27,22 @@ pushd build > /dev/null
${MAKE_CONFIGURE}
popd > /dev/null
-make -C build "${TARGET}"
+if [[ "x${TARGET}" = "xblogc-github-lambda" ]]; then
+ make -C build LDFLAGS="-all-static" blogc
+
+ rm -rf root
+ mkdir -p root
+
+ PV="$(grep PACKAGE_VERSION build/config.h | cut -d\" -f2)"
+
+ install -m 755 build/blogc root/blogc
+ install -m 644 src/blogc-github-lambda/lambda_function.py root/lambda_function.py
+ install -m 644 LICENSE root/LICENSE
+ strip root/blogc
+
+ pushd root/ > /dev/null
+ zip --symlinks -rq "../blogc-github-lambda-${PV}.zip" *
+ popd > /dev/null
+else
+ make -C build "${TARGET}"
+fi