[gjs: 2/3] test-ci: Avoid creating a ci-upstream-base-branch if it's there already




commit 5f6386461bdd8455701e1a19c7b00ed6139b3623
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Wed Jun 8 19:37:36 2022 +0200

    test-ci: Avoid creating a ci-upstream-base-branch if it's there already
    
    It could have been built by another pipeline apparently as we may get an
    error that the branch already exists.

 test/test-ci.sh | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/test/test-ci.sh b/test/test-ci.sh
index 4225c28bb..b6d738f77 100755
--- a/test/test-ci.sh
+++ b/test/test-ci.sh
@@ -25,6 +25,11 @@ do_Get_Upstream_Base () {
     echo '-----------------------------------------'
     echo 'Finding common ancestor'
 
+    if git show-branch ci-upstream-base-branch 2> /dev/null; then
+        echo "Already found"
+        return
+    fi
+
     # We need to add a new remote for the upstream target branch, since this
     # script could be running in a personal fork of the repository which has out
     # of date branches.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]