Commit b0030482 authored by Bolea Sanchez, Vicente Adolfo's avatar Bolea Sanchez, Vicente Adolfo Committed by Kitware Robot
Browse files

Merge topic 'backport-fix-fetcht-tags' into release

a5b9baf2

 CI: Fetch main repo tags from forks
Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Acked-by: default avatarBen Boeckel <ben.boeckel@kitware.com>
Merge-request: !2496
parents 1fcae770 a5b9baf2
......@@ -132,6 +132,7 @@ stages:
- SCCACHE_IDLE_TIMEOUT=0 sccache --start-server
- sccache --show-stats
- "cmake --version"
- "cmake -V -P .gitlab/ci/config/fetch_vtkm_tags.cmake"
- "cmake -V -P .gitlab/ci/config/gitlab_ci_setup.cmake"
- "ctest -VV -S .gitlab/ci/ctest_configure.cmake"
script:
......
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
## Fetch latests tags from VTK-m main repo
find_package(Git)
if(NOT Git_FOUND)
message(ERROR "Git not installed, Could not fetch vtk/vtk-m tags")
return()
endif()
set(REPO_URL "https://gitlab.kitware.com/vtk/vtk-m.git")
## Only fetch tags when in a fork in a MR since often times forks do not have
## the latest tags from the main repo.
if(DEFINED ENV{CI_MERGE_REQUEST_ID} AND NOT $ENV{CI_REPOSITORY_URL} MATCHES "vtk/vtk-m\\.git$")
message("Fetching vtk/vtk-m repo latest tags")
execute_process(
COMMAND
${GIT_EXECUTABLE}
fetch
${REPO_URL}
"refs/tags/*:refs/tags/*"
)
endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment