File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 15
15
exit 1
16
16
fi
17
17
18
+ if [ -n " $TRAVIS_BRANCH " ]; then
19
+ CLI_BRANCH=" $TRAVIS_BRANCH "
20
+ else
21
+ CLI_BRANCH=$( git -C " ${BASH_SOURCE%/* } " rev-parse --abbrev-ref HEAD)
22
+ fi
23
+
24
+ BOILERPLATE_URL=" https://github.com/cppsm/cppsm-boilerplate.git"
25
+
18
26
if [ ! -d .cppsm ]; then
19
- git submodule " ${GIT_QUIET[@]} " add --branch master https://github.com/cppsm/cppsm-boilerplate.git .cppsm
27
+ if git ls-remote --heads " $BOILERPLATE_URL " | grep -q " \brefs/heads/$CLI_BRANCH \$ " ; then
28
+ BOILERPLATE_BRANCH=" $CLI_BRANCH "
29
+ else
30
+ BOILERPLATE_BRANCH=" master"
31
+ fi
32
+ git submodule " ${GIT_QUIET[@]} " add --branch " $BOILERPLATE_BRANCH " " $BOILERPLATE_URL " .cppsm
20
33
fi
21
34
22
35
ln -fs .cppsm/.clang-format .clang-format
@@ -27,7 +40,7 @@ if [ ! -e CMakeLists.txt ]; then
27
40
cat << EOF > CMakeLists.txt
28
41
cmake_minimum_required(VERSION 3.9)
29
42
project(${PWD##*/ } )
30
- include(.cppsm/c++17-no-rtti-no-exns .cmake)
43
+ include(.cppsm/c++17.cmake)
31
44
EOF
32
45
fi
33
46
You can’t perform that action at this time.
0 commit comments