Pier Angelo Vendrame pushed to branch tor-browser-128.6.0esr-14.5-1 at The Tor Project / Applications / Tor Browser

Commits:

1 changed file:

Changes:

  • .gitlab/ci/mixins.yml
    ... ... @@ -12,7 +12,12 @@
    12 12
               exit 1
    
    13 13
           fi
    
    14 14
         - echo "Fetching from remote branch ${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
    
    15
    -    - git fetch origin "${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
    
    15
    +    - |
    
    16
    +      if ! git fetch origin "${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"; then
    
    17
    +            echo -e "\e[31mFetching failed for branch ${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} from $CI_REPOSITORY_URL.\e[0m"
    
    18
    +            echo "Attempting to fetch the merge request branch, assuming this pipeline is not running in a fork."
    
    19
    +            git fetch origin "merge-requests/${CI_MERGE_REQUEST_IID}/head"
    
    20
    +      fi
    
    16 21
         - git checkout origin/${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}
    
    17 22
     
    
    18 23
     .with-local-repo-pwsh:
    
    ... ... @@ -33,5 +38,10 @@
    33 38
               exit 1
    
    34 39
           }
    
    35 40
         - Write-Output "Fetching from remote branch $branchName"
    
    36
    -    - git fetch origin $branchName
    
    41
    +    - |
    
    42
    +      if (! git fetch origin $branchName) {
    
    43
    +        Write-Output "Fetching failed for branch $branchName from $env:CI_REPOSITORY_URL."
    
    44
    +        Write-Output "Attempting to fetch the merge request branch, assuming this pipeline is not running in a fork."
    
    45
    +        git fetch origin "merge-requests/$env:CI_MERGE_REQUEST_IID/head"
    
    46
    +      }
    
    37 47
         - git checkout origin/$branchName