From ba25922f737076fbcdbd81a01ce91240dca749db Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Fri, 10 Feb 2017 01:21:49 +0100 Subject: travis: removed travis dir to .travis --- .travis/build.sh | 15 +++++++++ .travis/deploy.sh | 71 ++++++++++++++++++++++++++++++++++++++++ .travis/targets/dist-srpm.sh | 19 +++++++++++ .travis/targets/distcheck.sh | 19 +++++++++++ .travis/targets/github-lambda.sh | 33 +++++++++++++++++++ .travis/targets/make-embedded.sh | 15 +++++++++ .travis/targets/valgrind.sh | 15 +++++++++ travis/build.sh | 15 --------- travis/deploy.sh | 71 ---------------------------------------- travis/targets/dist-srpm.sh | 19 ----------- travis/targets/distcheck.sh | 19 ----------- travis/targets/github-lambda.sh | 33 ------------------- travis/targets/make-embedded.sh | 15 --------- travis/targets/valgrind.sh | 15 --------- 14 files changed, 187 insertions(+), 187 deletions(-) create mode 100755 .travis/build.sh create mode 100755 .travis/deploy.sh create mode 100644 .travis/targets/dist-srpm.sh create mode 100644 .travis/targets/distcheck.sh create mode 100644 .travis/targets/github-lambda.sh create mode 100644 .travis/targets/make-embedded.sh create mode 100644 .travis/targets/valgrind.sh delete mode 100755 travis/build.sh delete mode 100755 travis/deploy.sh delete mode 100644 travis/targets/dist-srpm.sh delete mode 100644 travis/targets/distcheck.sh delete mode 100644 travis/targets/github-lambda.sh delete mode 100644 travis/targets/make-embedded.sh delete mode 100644 travis/targets/valgrind.sh diff --git a/.travis/build.sh b/.travis/build.sh new file mode 100755 index 0000000..9e12ada --- /dev/null +++ b/.travis/build.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -ex + +if [[ -n "${TARGET}" ]] && [[ -e "travis/targets/${TARGET}.sh" ]]; then + source "travis/targets/${TARGET}.sh" +else + echo "Target not defined or invalid!" + exit 1 +fi + +rm -rf build +mkdir -p build + +build diff --git a/.travis/deploy.sh b/.travis/deploy.sh new file mode 100755 index 0000000..e064ee9 --- /dev/null +++ b/.travis/deploy.sh @@ -0,0 +1,71 @@ +#!/bin/bash + +set -e + +if [[ "x${TRAVIS_PULL_REQUEST}" != "xfalse" ]]; then + echo "This is a pull request. skipping deploy ..." + exit 0 +fi + +if [[ "x${TRAVIS_BRANCH}" != "xmaster" ]] && [[ "x${TRAVIS_TAG}" != xv* ]]; then + echo "This isn't master branch nor a valid tag. skipping deploy ..." + exit 0 +fi + +if [[ "x${CC}" != "xgcc" ]] || [[ "x${TARGET}" = "xvalgrind" ]] || [[ "x${TARGET}" = "xmake-embedded" ]]; then + echo "Invalid target for deploy. skipping ..." + exit 0 +fi + +if [[ ! -d build ]]; then + echo "Build directory not found." + exit 1 +fi + +FILES= +if [[ -n "${TARGET}" ]] && [[ -e "travis/targets/${TARGET}.sh" ]]; then + source "travis/targets/${TARGET}.sh" +else + echo "Target not defined or invalid!" + exit 1 +fi + +deploy + +TARNAME="$(grep PACKAGE_TARNAME build/config.h | cut -d\" -f2)" +VERSION="$(grep PACKAGE_VERSION build/config.h | cut -d\" -f2)" + +do_curl() { + curl \ + --silent \ + --ftp-create-dirs \ + --upload-file "${1}" \ + --user "${FTP_USER}:${FTP_PASSWORD}" \ + "ftp://${FTP_HOST}/public_html/${TARNAME}/${TARNAME}-${VERSION}/$(basename ${1})" +} + +echo " * Found files:" +for f in "${FILES[@]}"; do + echo " $(basename ${f})" +done +echo + +for f in "${FILES[@]}"; do + echo " * Processing file: $(basename ${f}):" + + echo -n " Generating SHA512 checksum ... " + pushd "$(dirname ${f})" > /dev/null + sha512sum "$(basename ${f})" > "$(basename ${f}).sha512" + popd > /dev/null + echo "done" + + echo -n " Uploading file ... " + do_curl "${f}" + echo "done" + + echo -n " Uploading SHA512 checksum ... " + do_curl "${f}.sha512" + echo "done" + + echo +done diff --git a/.travis/targets/dist-srpm.sh b/.travis/targets/dist-srpm.sh new file mode 100644 index 0000000..87858c6 --- /dev/null +++ b/.travis/targets/dist-srpm.sh @@ -0,0 +1,19 @@ +build() { + pushd build > /dev/null + ../configure \ + CFLAGS="-Wall -g -O0" \ + --disable-silent-rules \ + --enable-ronn \ + --enable-tests \ + --enable-valgrind \ + --enable-git-receiver \ + --enable-make \ + --enable-runserver + popd > /dev/null + + make -C build dist-srpm +} + +deploy() { + FILES=( build/*.src.rpm ) +} diff --git a/.travis/targets/distcheck.sh b/.travis/targets/distcheck.sh new file mode 100644 index 0000000..06a0ba3 --- /dev/null +++ b/.travis/targets/distcheck.sh @@ -0,0 +1,19 @@ +build() { + pushd build > /dev/null + ../configure \ + CFLAGS="-Wall -g -O0" \ + --disable-silent-rules \ + --enable-ronn \ + --enable-tests \ + --enable-valgrind \ + --enable-git-receiver \ + --enable-make \ + --enable-runserver + popd > /dev/null + + make -C build distcheck +} + +deploy() { + FILES=( build/*.{*.tar.{gz,bz2,xz},zip} ) +} 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 ) +} diff --git a/.travis/targets/make-embedded.sh b/.travis/targets/make-embedded.sh new file mode 100644 index 0000000..b2d3f80 --- /dev/null +++ b/.travis/targets/make-embedded.sh @@ -0,0 +1,15 @@ +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 check +} diff --git a/.travis/targets/valgrind.sh b/.travis/targets/valgrind.sh new file mode 100644 index 0000000..7870ec1 --- /dev/null +++ b/.travis/targets/valgrind.sh @@ -0,0 +1,15 @@ +build() { + pushd build > /dev/null + ../configure \ + CFLAGS="-Wall -g -O0" \ + --disable-silent-rules \ + --enable-ronn \ + --enable-tests \ + --enable-valgrind \ + --enable-git-receiver \ + --enable-make \ + --enable-runserver + popd > /dev/null + + make -C build valgrind +} diff --git a/travis/build.sh b/travis/build.sh deleted file mode 100755 index 9e12ada..0000000 --- a/travis/build.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -ex - -if [[ -n "${TARGET}" ]] && [[ -e "travis/targets/${TARGET}.sh" ]]; then - source "travis/targets/${TARGET}.sh" -else - echo "Target not defined or invalid!" - exit 1 -fi - -rm -rf build -mkdir -p build - -build diff --git a/travis/deploy.sh b/travis/deploy.sh deleted file mode 100755 index e064ee9..0000000 --- a/travis/deploy.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -set -e - -if [[ "x${TRAVIS_PULL_REQUEST}" != "xfalse" ]]; then - echo "This is a pull request. skipping deploy ..." - exit 0 -fi - -if [[ "x${TRAVIS_BRANCH}" != "xmaster" ]] && [[ "x${TRAVIS_TAG}" != xv* ]]; then - echo "This isn't master branch nor a valid tag. skipping deploy ..." - exit 0 -fi - -if [[ "x${CC}" != "xgcc" ]] || [[ "x${TARGET}" = "xvalgrind" ]] || [[ "x${TARGET}" = "xmake-embedded" ]]; then - echo "Invalid target for deploy. skipping ..." - exit 0 -fi - -if [[ ! -d build ]]; then - echo "Build directory not found." - exit 1 -fi - -FILES= -if [[ -n "${TARGET}" ]] && [[ -e "travis/targets/${TARGET}.sh" ]]; then - source "travis/targets/${TARGET}.sh" -else - echo "Target not defined or invalid!" - exit 1 -fi - -deploy - -TARNAME="$(grep PACKAGE_TARNAME build/config.h | cut -d\" -f2)" -VERSION="$(grep PACKAGE_VERSION build/config.h | cut -d\" -f2)" - -do_curl() { - curl \ - --silent \ - --ftp-create-dirs \ - --upload-file "${1}" \ - --user "${FTP_USER}:${FTP_PASSWORD}" \ - "ftp://${FTP_HOST}/public_html/${TARNAME}/${TARNAME}-${VERSION}/$(basename ${1})" -} - -echo " * Found files:" -for f in "${FILES[@]}"; do - echo " $(basename ${f})" -done -echo - -for f in "${FILES[@]}"; do - echo " * Processing file: $(basename ${f}):" - - echo -n " Generating SHA512 checksum ... " - pushd "$(dirname ${f})" > /dev/null - sha512sum "$(basename ${f})" > "$(basename ${f}).sha512" - popd > /dev/null - echo "done" - - echo -n " Uploading file ... " - do_curl "${f}" - echo "done" - - echo -n " Uploading SHA512 checksum ... " - do_curl "${f}.sha512" - echo "done" - - echo -done diff --git a/travis/targets/dist-srpm.sh b/travis/targets/dist-srpm.sh deleted file mode 100644 index 87858c6..0000000 --- a/travis/targets/dist-srpm.sh +++ /dev/null @@ -1,19 +0,0 @@ -build() { - pushd build > /dev/null - ../configure \ - CFLAGS="-Wall -g -O0" \ - --disable-silent-rules \ - --enable-ronn \ - --enable-tests \ - --enable-valgrind \ - --enable-git-receiver \ - --enable-make \ - --enable-runserver - popd > /dev/null - - make -C build dist-srpm -} - -deploy() { - FILES=( build/*.src.rpm ) -} diff --git a/travis/targets/distcheck.sh b/travis/targets/distcheck.sh deleted file mode 100644 index 06a0ba3..0000000 --- a/travis/targets/distcheck.sh +++ /dev/null @@ -1,19 +0,0 @@ -build() { - pushd build > /dev/null - ../configure \ - CFLAGS="-Wall -g -O0" \ - --disable-silent-rules \ - --enable-ronn \ - --enable-tests \ - --enable-valgrind \ - --enable-git-receiver \ - --enable-make \ - --enable-runserver - popd > /dev/null - - make -C build distcheck -} - -deploy() { - FILES=( build/*.{*.tar.{gz,bz2,xz},zip} ) -} diff --git a/travis/targets/github-lambda.sh b/travis/targets/github-lambda.sh deleted file mode 100644 index a92d586..0000000 --- a/travis/targets/github-lambda.sh +++ /dev/null @@ -1,33 +0,0 @@ -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 ) -} diff --git a/travis/targets/make-embedded.sh b/travis/targets/make-embedded.sh deleted file mode 100644 index b2d3f80..0000000 --- a/travis/targets/make-embedded.sh +++ /dev/null @@ -1,15 +0,0 @@ -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 check -} diff --git a/travis/targets/valgrind.sh b/travis/targets/valgrind.sh deleted file mode 100644 index 7870ec1..0000000 --- a/travis/targets/valgrind.sh +++ /dev/null @@ -1,15 +0,0 @@ -build() { - pushd build > /dev/null - ../configure \ - CFLAGS="-Wall -g -O0" \ - --disable-silent-rules \ - --enable-ronn \ - --enable-tests \ - --enable-valgrind \ - --enable-git-receiver \ - --enable-make \ - --enable-runserver - popd > /dev/null - - make -C build valgrind -} -- cgit v1.2.3-18-g5258