From 6e8e544cb8559aa5d8db72176c957e2513e3898a Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Fri, 10 Feb 2017 01:14:48 +0100 Subject: travis: splitted scripts --- build-aux/travis-build.sh | 48 -------------------------------- build-aux/travis-deploy.sh | 69 ---------------------------------------------- 2 files changed, 117 deletions(-) delete mode 100755 build-aux/travis-build.sh delete mode 100755 build-aux/travis-deploy.sh (limited to 'build-aux') diff --git a/build-aux/travis-build.sh b/build-aux/travis-build.sh deleted file mode 100755 index 223d145..0000000 --- a/build-aux/travis-build.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -set -ex - -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 - -pushd build > /dev/null -../configure \ - CFLAGS="-Wall -g -O0" \ - --enable-ronn \ - --disable-silent-rules \ - --enable-tests \ - --enable-valgrind \ - --enable-git-receiver \ - --enable-runserver \ - ${MAKE_CONFIGURE} -popd > /dev/null - -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 diff --git a/build-aux/travis-deploy.sh b/build-aux/travis-deploy.sh deleted file mode 100755 index 7c295c4..0000000 --- a/build-aux/travis-deploy.sh +++ /dev/null @@ -1,69 +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}" = "xblogc-make-embedded" ]]; then - echo "Invalid target for deploy. skipping ..." - exit 0 -fi - -if [[ ! -d build ]]; then - echo "Build directory not found." - exit 1 -fi - -if [[ "x${TARGET}" = "xdist-srpm" ]]; then - FILES=( build/*.src.rpm ) -elif [[ "x${TARGET}" = "xblogc-github-lambda" ]]; then - FILES=( *.zip ) -else - FILES=( build/*.{*.tar.{gz,bz2,xz},zip} ) -fi - -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 -- cgit v1.2.3-18-g5258