diff options
Diffstat (limited to 'src/CI/travis/before_deploy')
-rwxr-xr-x | src/CI/travis/before_deploy | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/CI/travis/before_deploy b/src/CI/travis/before_deploy index 1164dcf..9d3fd05 100755 --- a/src/CI/travis/before_deploy +++ b/src/CI/travis/before_deploy @@ -1,4 +1,6 @@ -#!/bin/sh +#!/bin/sh -e + +. CI/travis/lib.sh # Don't prepare a deploy on a Coverity build if [ "x${COVERITY_SCAN_PROJECT_NAME}" != "x" ] ; then exit 0; fi @@ -18,8 +20,11 @@ else fi pwd +if [ -z "${LDIST}" -a -f "build/.LDIST" ] ; then + export LDIST="-$(cat build/.LDIST)" +fi if [ -z "${LDIST}" ] ; then - LDIST=-$(lsb_release -c | awk '{print $NF}') + export LDIST="-$(get_ldist)" fi check_file() @@ -27,7 +32,7 @@ check_file() temp="" for i in $(find ./ -name CMakeCache.txt) do -hit=$(find $(dirname ${i}) -maxdepth 1 -name "libiio*.$1" | grep -v -- ${LDIST}) +hit=$(find $(dirname ${i}) -maxdepth 1 -name "libiio*.$1" -a ! -name "*${LDIST}*") if [ "$(echo ${hit} | wc -w)" -gt "1" ] ; then echo "I am confused - more than 2 $1 files!" echo $hit @@ -52,7 +57,7 @@ if [ -n "${temp}" ] ; then deploy=$(expr ${deploy} + 1) if [ -z "${TARGET_DEB}" ] ; then export TARGET_DEB=$(echo ${temp} | \ - sed -e 's:^./.*/::' -e 's:.deb$::')${LDIST}.deb + sed -e 's:^./.*/::' -e 's:-Linux::' -e 's:.deb$::')${LDIST}.deb fi echo "deploying ${temp} to nightly $TARGET_DEB" if [ -z "${RELEASE_PKG_FILE_DEB}" ] ; then @@ -72,7 +77,7 @@ if [ -n "${temp}" ] ; then deploy=$(expr ${deploy} + 1) if [ -z "${TARGET_RPM}" ] ; then export TARGET_RPM=$(echo ${temp} | \ - sed -e 's:^./.*/::' -e 's:.rpm$::')${LDIST}.rpm + sed -e 's:^./.*/::' -e 's:-Linux::' -e 's:.rpm$::')${LDIST}.rpm fi echo "deploying ${temp} to nightly $TARGET_RPM" if [ -z "${RELEASE_PKG_FILE_RPM}" ] ; then @@ -137,7 +142,7 @@ if [ -n "${temp}" ] ; then ) export TARGET_TGZ=$(echo ${temp} | \ - sed -e 's:^./.*/::' -e 's:.tar.gz$::')${LDIST}.tar.gz; + sed -e 's:^./.*/::' -e 's:-Linux::' -e 's:-Darwin::' -e 's:.tar.gz$::')${LDIST}.tar.gz; fi echo "deploying ${temp} to $TARGET_TGZ" if [ -z "${RELEASE_PKG_FILE_TGZ}" ] ; then |