File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 12
12
13
13
DOC_REPO=" scikit-learn.github.io"
14
14
15
- MSG=" Pushing the docs for revision for branch: $CIRCLE_BRANCH , commit $CIRCLE_SHA1 "
15
+ if [ " $CIRCLE_BRANCH " = " master" ]
16
+ then
17
+ dir=dev
18
+ else
19
+ # Strip off .X
20
+ dir=" ${CIRCLE_BRANCH::- 2} "
21
+ fi
22
+
23
+ MSG=" Pushing the docs to $dir / for branch: $CIRCLE_BRANCH , commit $CIRCLE_SHA1 "
16
24
17
25
cd $HOME
18
26
if [ ! -d $DOC_REPO ];
19
27
then git clone " git@github.com:scikit-learn/" $DOC_REPO " .git" ;
20
28
fi
21
29
cd $DOC_REPO
22
- git checkout master
23
- git reset --hard origin/master
24
- git rm -rf dev / && rm -rf dev /
25
- cp -R $HOME /scikit-learn/doc/_build/html/stable dev
30
+ git checkout $CIRCLE_BRANCH
31
+ git reset --hard origin/$CIRCLE_BRANCH
32
+ git rm -rf $dir / && rm -rf $dir /
33
+ cp -R $HOME /scikit-learn/doc/_build/html/stable $dir
26
34
git config --global user.email " olivier.grisel+sklearn-ci@gmail.com"
27
35
git config --global user.name $USERNAME
28
36
git config --global push.default matching
29
- git add -f dev /
30
- git commit -m " $MSG " dev
37
+ git add -f $dir /
38
+ git commit -m " $MSG " $dir
31
39
git push
32
40
33
41
echo $MSG
Original file line number Diff line number Diff line change 13
13
- cat ~/log.txt && if grep -q "Traceback (most recent call last):" ~/log.txt; then false; else true; fi
14
14
deployment :
15
15
push :
16
- branch : master
16
+ branch : /^ master$|^[0-9]+\.[0-9]+\.X$/
17
17
commands :
18
18
- bash build_tools/circle/push_doc.sh
19
19
general :
You can’t perform that action at this time.
0 commit comments