File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -221,9 +221,16 @@ cd -
221221set +o pipefail
222222
223223affected_doc_paths () {
224+ scikit_learn_version=$( python -c ' import re; import sklearn; print(re.sub(r"(\d+\.\d+).+", r"\1", sklearn.__version__))' )
224225 files=$( git diff --name-only origin/main...$CIRCLE_SHA1 )
225226 # use sed to replace files ending by .rst or .rst.template by .html
226- echo " $files " | grep ^doc/.* \. rst | sed ' s/^doc\/\(.*\)\.rst$/\1.html/; s/^doc\/\(.*\)\.rst\.template$/\1.html/'
227+ echo " $files " | grep -vP ' upcoming_changes/.*/\d+.*\.rst' | grep ^doc/.* \. rst | \
228+ sed ' s/^doc\/\(.*\)\.rst$/\1.html/; s/^doc\/\(.*\)\.rst\.template$/\1.html/'
229+ # replace towncrier fragment files by link to changelog. uniq is used
230+ # because in some edge cases multiple fragments can be added and we want a
231+ # single link to the changelog.
232+ echo " $files " | grep -P ' upcoming_changes/.*/\d+.*\.rst' | sed " s@.*@whats_new/v${scikit_learn_version} .html@" | uniq
233+
227234 echo " $files " | grep ^examples/.* .py | sed ' s/^\(.*\)\.py$/auto_\1.html/'
228235 sklearn_files=$( echo " $files " | grep ' ^sklearn/' )
229236 if [ -n " $sklearn_files " ]
You can’t perform that action at this time.
0 commit comments