forked from ryppl/Boost2Git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
git_push.cmake
40 lines (33 loc) · 1.09 KB
/
git_push.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Created by Daniel Pfeifer <daniel@pfeifer-mail.de>
#
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt
execute_process(COMMAND ${GIT} push --quiet --mirror git@bitbucket.org:boostorg/${NAME}.git
RESULT_VARIABLE result
)
if(NOT result EQUAL 0)
# try again
execute_process(COMMAND ${GIT} push --quiet --mirror git@bitbucket.org:boostorg/${NAME}.git
RESULT_VARIABLE result
)
endif()
if(NOT result EQUAL 0)
message(FATAL_ERROR "Failed to push ${NAME} to bitbucket!")
endif()
# GitHub does not accept files bigger than 100MB. The sandbox is on Bitbucket only.
if("${NAME}" STREQUAL "sandbox")
return()
endif()
execute_process(COMMAND ${GIT} push --quiet --mirror git@github.com:boostorg/${NAME}.git
RESULT_VARIABLE result
)
if(NOT result EQUAL 0)
# try again
execute_process(COMMAND ${GIT} push --quiet --mirror git@github.com:boostorg/${NAME}.git
RESULT_VARIABLE result
)
endif()
if(NOT result EQUAL 0)
message(FATAL_ERROR "Failed to push ${NAME} to github!")
endif()