Rather than check out a release repo to see if it exists or not use git ls-remote to establish if it exists
This commit is contained in:
parent
c13ba0d628
commit
9af654fb28
1 changed files with 1 additions and 3 deletions
|
|
@ -119,14 +119,12 @@ def checkRepoExists(String gitURL) {
|
|||
if (isUnix()) {
|
||||
result = sh( script: """
|
||||
git ls-remote "${gitURL}" CHECK_GIT_REMOTE_URL_REACHABILITY
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
""",
|
||||
returnStatus: true
|
||||
)
|
||||
} else {
|
||||
result = bat( script: """
|
||||
git ls-remote "${gitURL}" CHECK_GIT_REMOTE_URL_REACHABILITY
|
||||
if errorlevel 1 EXIT /b 1
|
||||
@git ls-remote "${gitURL}" CHECK_GIT_REMOTE_URL_REACHABILITY
|
||||
""",
|
||||
returnStatus: true
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue