Commit 0e27da84 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

ci: update fetch_submodule.cmake

parent a42a3b80
cmake_minimum_required(VERSION 2.8.8)
cmake_minimum_required(VERSION 3.8)
# Find Git.
find_program(GIT_COMMAND NAMES git git.cmd)
execute_process(
COMMAND "${GIT_COMMAND}" submodule update --init --recursive
OUTPUT_VARIABLE init_submodules
RESULT_VARIABLE res
ERROR_VARIABLE err
OUTPUT_STRIP_TRAILING_WHITESPACE)
# Ignore the error; we just want to make sure the submodules are present.
# Check if we're in a merge request (nothing should be needed if not).
if ("$ENV{CI_MERGE_REQUEST_ID}" STREQUAL "")
return ()
endif ()
# Find Git.
find_program(GIT_COMMAND NAMES git git.cmd)
if (NOT GIT_COMMAND)
message(FATAL_ERROR
"`git` was not found.")
......
......@@ -84,7 +84,6 @@
- export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH
- cmake --version
- ninja --version
- "git submodule update --init --recursive || :"
- git submodule foreach --recursive cmake -P "$PWD/.gitlab/ci/fetch_submodule.cmake"
- git submodule sync --recursive
- git submodule update --init --recursive
......
......@@ -63,7 +63,6 @@
# Download Qt
- cmake -P .gitlab/ci/download_qt.cmake
- export CMAKE_PREFIX_PATH=$PWD/.gitlab/qt
- "git submodule update --init --recursive || :"
- git submodule foreach --recursive cmake -P "$PWD/.gitlab/ci/fetch_submodule.cmake"
- git submodule sync --recursive
- git submodule update --init --recursive
......
......@@ -74,7 +74,6 @@
- cmake --version
- ninja --version
# Support submodule references to the user's fork.
- git submodule update --init --recursive
- git submodule foreach --recursive cmake -P "$pwdpath/.gitlab/ci/fetch_submodule.cmake"
- git submodule sync --recursive
- git submodule update --init --recursive
......
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