OSDN Git Service

travis-ci: fix "skip_branch_tip_with_tag()" string comparison
authorLars Schneider <larsxschneider@gmail.com>
Thu, 21 Sep 2017 20:48:30 +0000 (22:48 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Sep 2017 01:58:29 +0000 (10:58 +0900)
09f5e97 ("travis-ci: skip a branch build if equal tag is present",
2017-09-17) introduced the "skip_branch_tip_with_tag" function with
a broken string comparison. Fix it!

Reported-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/lib-travisci.sh

index 9c4ae9b..b3ed0a0 100755 (executable)
@@ -14,7 +14,7 @@ skip_branch_tip_with_tag () {
        # of a tag.
 
        if TAG=$(git describe --exact-match "$TRAVIS_BRANCH" 2>/dev/null) &&
-               $TAG != $TRAVIS_BRANCH
+               test "$TAG" != "$TRAVIS_BRANCH"
        then
                echo "Tip of $TRAVIS_BRANCH is exactly at $TAG"
                exit 0