diff --git a/.travis.yml b/.travis.yml index aaed88f469c3b6138b2943382826be7a3cc8f235..5aa8df833b3a112b963c97ecd97a35921f5b17e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,3 +14,4 @@ script: - docker run --rm -v $(pwd):${mntdir} base/archlinux:latest /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh archlinux" #- docker run --rm -v $(pwd):${mntdir} ubuntu:16.04 /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh snap" #- docker run --rm -v $(pwd):${mntdir} --cap-add SYS_ADMIN --device /dev/fuse ubuntu:14.04 /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh appimage" + - cat transfer.log diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 0ae658a833c72c10fa700c5f5a2cb198610af817..3879c13c683ad6f317eea63a9c8483a4f0718c0e 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -5,27 +5,32 @@ pipelines: image: ubuntu:14.04 script: - sh scripts/build-docker.sh ubuntu + - cat transfer.log custom: build-ubuntu: - step: image: ubuntu:14.04 script: - sh scripts/build-docker.sh ubuntu + - cat transfer.log build-fedora: - step: image: fedora:20 script: - sh scripts/build-docker.sh fedora + - cat transfer.log build-archlinux: - step: image: base/archlinux:latest script: - sh scripts/build-docker.sh archlinux + - cat transfer.log build-snap: - step: image: ubuntu:16.04 script: - sh scripts/build-docker.sh snap + - cat transfer.log build-appimage: - step: image: ubuntu:14.04 @@ -34,3 +39,4 @@ pipelines: - echo 'appimage build is disabled currently' - exit 1 - sh scripts/build-docker.sh appimage + - cat transfer.log diff --git a/scripts/build-docker.sh b/scripts/build-docker.sh index bff025c08b3c74a69882ab93a805695d9af50a68..ee6403b45d7d4084c83f4c6a3b29c0090bc114dc 100644 --- a/scripts/build-docker.sh +++ b/scripts/build-docker.sh @@ -17,12 +17,14 @@ PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)" BUILDSCRIPT="${PROJDIR}/scripts/build.sh" +TRANSFERLOG="${PROJDIR}/transfer.log" + transfer_file() { filepath="${1}" if [ -f "${filepath}" ]; then filename="$(basename "${filepath}")" - echo "Uploading ${filename}" - curl -T "${filepath}" "https://transfer.sh/${filename}" + echo "Uploading ${filename}" >> "${TRANSFERLOG}" + curl -T "${filepath}" "https://transfer.sh/${filename}" >> "${TRANSFERLOG}" fi } @@ -39,7 +41,7 @@ build_ubuntu() { su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER} - transfer_file "$(find "${PROJDIR}/build_*" -type f -name "${PKGNAME}*.deb")" + transfer_file "$(find "${PROJDIR}/build_"* -type f -name "${PKGNAME}*.deb")" } build_fedora() { @@ -58,7 +60,7 @@ build_fedora() { su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER} - transfer_file "$(find "${PROJDIR}/build_*" -type f -name "${PKGNAME}*.rpm")" + transfer_file "$(find "${PROJDIR}/build_"* -type f -name "${PKGNAME}*.rpm")" } build_archlinux() { @@ -74,7 +76,7 @@ build_archlinux() { su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER} - transfer_file "$(find "${PROJDIR}/build_*" -type f -name "${PKGNAME}*.pkg.tar.xz")" + transfer_file "$(find "${PROJDIR}/build_"* -type f -name "${PKGNAME}*.pkg.tar.xz")" } build_snap() { @@ -90,7 +92,7 @@ build_snap() { su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER} - transfer_file "$(find "${PROJDIR}/build_*" -type f -name "${PKGNAME}*.snap")" + transfer_file "$(find "${PROJDIR}/build_"* -type f -name "${PKGNAME}*.snap")" } build_appimage() { @@ -108,7 +110,7 @@ build_appimage() { su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER} - transfer_file "$(find "${PROJDIR}/build_*" -type f -name "${PKGNAME}*.AppImage")" + transfer_file "$(find "${PROJDIR}/build_"* -type f -name "${PKGNAME}*.AppImage")" } if [ "${BUILDTYPE}" = 'ubuntu' ]; then