8000 Implement @thomasjpfan version · scikit-learn/scikit-learn@06b8119 · GitHub
[go: up one dir, main page]

Skip to content

Commit 06b8119

Browse files
committed
Implement @thomasjpfan version
1 parent d533bcb commit 06b8119

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

build_tools/circle/build_doc.sh

+10-19
Original file line numberDiff line numberDiff line change
@@ -85,32 +85,23 @@ get_build_type() {
8585
examples_in_rst="$(echo "$scripts_names" | uniq )"
8686
fi
8787

88-
#initialize pattern
89-
pattern=""
90-
9188
# executed only if there are examples in the modified rst files
9289
if [[ -n "$examples_in_rst" ]]
9390
then
94-
pattern=$($pattern)$(echo "$examples_in_rst" | paste -sd '|' )
91+
if [[ -n "$changed_examples" ]]
92+
then
93+
changed_examples="$changed_examples|$examples_in_rst"
94+
else
95+
changed_examples="$examples_in_rst"
96+
fi
9597
fi
9698

97-
# executed only if some examples have been modified
9899
if [[ -n "$changed_examples" ]]
99100
then
100-
pattern=$(echo $pattern)"|"$(echo "$changed_examples" | paste -sd '|')
101-
fi
102-
103-
# cut trailing initial "|" if only examples in rst need to be built
104-
if [[ $pattern="|" ]]
105-
then
106-
pattern=$(echo "$pattern" | cut -c 2-)
107-
fi
108-
109-
# pattern for examples to run is the last line of output
110-
if [[ -n "$pattern" ]]
111-
then
112-
echo BUILD: detected examples/ filename modified in $git_range: $pattern
113-
echo $pattern
101+
echo BUILD: detected examples/ filename modified in $git_range: $changed_examples
102+
pattern=$(echo "$changed_examples" | paste -sd '|')
103+
# pattern for examples to run is the last line of output
104+
echo "$pattern"
114105
return
115106
fi
116107

0 commit comments

Comments
 (0)
0