aboutsummaryrefslogtreecommitdiffstats
path: root/travis/targets/github-lambda.sh
blob: a92d58679adcf324d28313ed6764ee5da05b90bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 )
}