From 60d1c6f92d7bea88343d6b28539fc7eefe1552e5 Mon Sep 17 00:00:00 2001 From: Eric Fontaine Date: Wed, 9 Mar 2016 10:21:28 -0500 Subject: [PATCH] allow Travis to upload ALL branches to bintray I would like my personal travis to upload all my personal branches to my personal bintray. To accomplish this, if the Travis environment variable $APPIMAGE_UPLOAD_BRANCHES is set to the specific string "ALL", then the command "./build/travis/job2_AppImage/build.sh --upload-branches $APPIMAGE_UPLOAD_BRANCHES" will upload all branches. But, if user leaves the $APPIMAGE_UPLOAD_BRANCHES undefined, then that command won't upload any branches. --- build/travis/job2_AppImage/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/travis/job2_AppImage/build.sh b/build/travis/job2_AppImage/build.sh index bdcf4e855c1c2..9d43e404d6185 100755 --- a/build/travis/job2_AppImage/build.sh +++ b/build/travis/job2_AppImage/build.sh @@ -46,14 +46,14 @@ case "$1" in esac # Should the AppImage be uploaded? -if [ "$1" == "--upload-branches" ]; then - # User passed in list of branchs so only upload those listed +if [ "$1" == "--upload-branches" ] && [ "$2" != "ALL" ]; then + # User passed in a list of zero or more branches so only upload those listed shift for upload_branch in "$@" ; do [ "$branch" == "$upload_branch" ] && upload=true || true # bypass `set -e` done else - # No list passed in so upload on every branch + # No list passed in (or specified "ALL"), so upload on every branch upload=true fi