From 28a6e7199223d72af06952c7e695c4144ac13d2e Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Fri, 27 Dec 2019 09:04:02 -0600 Subject: [PATCH] deploy raspbian builds to debian target folder --- utils/packpack/rsync_xfer.sh | 53 ++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/utils/packpack/rsync_xfer.sh b/utils/packpack/rsync_xfer.sh index a912079e0..9d9a16056 100755 --- a/utils/packpack/rsync_xfer.sh +++ b/utils/packpack/rsync_xfer.sh @@ -2,7 +2,7 @@ # We don't deploy during eslint checks, so exit immediately if [ "${DIST}" == "eslint" ]; then - exit 0 + exit 0 fi # Check to see if this script has access to all the commands it needs @@ -17,33 +17,26 @@ for CMD in sshfs rsync find fusermount mkdir; do fi done -# See https://docs.travis-ci.com/user/cron-jobs/ -# -# TO-DO: Deploy after ever commit for rpm builds after pacakge signing & repo creation is containerized -# -if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ]; then - - if [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ]; then - targetfolder="debian/master/mini-dinstall/incoming" - else - targetfolder="travis" - fi - - echo - echo "Target subfolder set to $targetfolder" - echo - - echo "Running \$(rsync -v -e 'ssh -vvv' build/*.{rpm,deb,dsc,tar.xz,changes} zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1)" - rsync -v --ignore-missing-args -e 'ssh -vvv' build/*.{rpm,deb,dsc,tar.xz,changes} zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1 - if [ "$?" -eq 0 ]; then - echo - echo "Files copied successfully." - echo - else - echo - echo "ERROR: Attempt to rsync to zmrepo.zoneminder.com failed!" - echo "See log output for details." - echo - exit 99 - fi +if [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ] || [ "${OS}" == "raspbian" ]; then + targetfolder="debian/master/mini-dinstall/incoming" +else + targetfolder="travis" +fi + +echo +echo "Target subfolder set to $targetfolder" +echo + +echo "Running \$(rsync -v -e 'ssh -vvv' build/*.{rpm,deb,dsc,tar.xz,changes} zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1)" +rsync -v --ignore-missing-args -e 'ssh -vvv' build/*.{rpm,deb,dsc,tar.xz,changes} zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1 +if [ "$?" -eq 0 ]; then + echo + echo "Files copied successfully." + echo +else + echo + echo "ERROR: Attempt to rsync to zmrepo.zoneminder.com failed!" + echo "See log output for details." + echo + exit 99 fi