1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

Utilities/Release: Fetch from gitlab.kitware.com repository

Update our release scripts to fetch from the gitlab.kitware.com
repository instead of the cmake.org repository.  Revise our
mapping of special branch names to account for the refs that
now store them in the new repository.
This commit is contained in:
Brad King
2017-03-03 14:34:58 -05:00
parent e7e939058d
commit 9a1ee04dd5
2 changed files with 11 additions and 3 deletions

View File

@@ -32,9 +32,15 @@ if(NOT DEFINED GIT_COMMAND)
set(GIT_COMMAND git)
endif()
if(${CMAKE_CREATE_VERSION} MATCHES "^(release|maint|next|nightly)$")
if(CMAKE_CREATE_VERSION MATCHES "^(master|release)$")
set(GIT_FETCH "")
set(GIT_BRANCH origin/${CMAKE_CREATE_VERSION})
elseif(CMAKE_CREATE_VERSION STREQUAL "nightly")
set(nightly stage/master/nightly/latest)
set(GIT_FETCH "${GIT_COMMAND} fetch origin refs/${nightly}:refs/remotes/origin/${nightly}")
set(GIT_BRANCH origin/${nightly})
else()
set(GIT_FETCH "")
set(GIT_BRANCH ${CMAKE_CREATE_VERSION})
endif()

View File

@@ -94,13 +94,15 @@ cd @CMAKE_RELEASE_DIRECTORY@
if [ ! -z "@GIT_COMMAND@" ]; then
# clone the repo without creating any source files in the directory
# matching the branch being built (i.e. master CMake-2-8, etc)
@GIT_COMMAND@ clone -n git://cmake.org/cmake.git @CMAKE_CREATE_VERSION@
check_exit_value $? "Checkout git cmake source" || exit 1
@GIT_COMMAND@ clone -n https://gitlab.kitware.com/cmake/cmake.git @CMAKE_CREATE_VERSION@
check_exit_value $? "git clone cmake source" || exit 1
# go into the git directory
cd @CMAKE_CREATE_VERSION@
# run any extra commands if they exist
@GIT_EXTRA@
check_exit_value $? "git extra cmake source" || exit 1
@GIT_FETCH@
check_exit_value $? "git extra fetch" || exit 1
# now checkout a copy on the local branch working
@GIT_COMMAND@ checkout -b working @GIT_BRANCH@
check_exit_value $? "git checkout" || exit 1