From 5a012f528d8e7c945e803b0df5b7cd6c687cc9be Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Sun, 9 Apr 2017 07:50:03 +0300 Subject: [PATCH] Upload release builds to 'sysbench' repo, other ones to 'sysbench-prereleases'. --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index 38cb10f..47c8459 100644 --- a/.travis.yml +++ b/.travis.yml @@ -102,6 +102,16 @@ addons: - clang-3.6 before_install: + # Upload builds corresponding to release tags to the 'sysbench' + # repository, push other ones to 'sysbench-prereleases' + - commits=$(git describe --long --always | + sed -n 's/^\([0-9\.]*\)-\([0-9]*\)-\([a-z0-9]*\)/\2/p') + - > + if [ ${commits:-0} = 0 ]; then + PACKAGECLOUD_REPO=sysbench + else + PACKAGECLOUD_REPO=sysbench-prereleases + fi - > if [ "x$TARGET" = "xtest" ]; then case "${TRAVIS_OS_NAME:-linux}" in