Skip to content

Commit ebde730

Browse files
author
Matthias Koeppe
committed
.github/workflows/doc-build.yml: Only patch versions in the old HTML output
1 parent cdd675d commit ebde730

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/doc-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
if [ ! -f worktree-image/.gitignore ]; then cp .gitignore worktree-image/; fi
5151
(cd worktree-image && git add -A && git commit --allow-empty -m "old" -a && git tag -f old && git reset --hard new && git reset old)
5252
# Keep track of changes to built HTML
53-
(cd /sage/local/share/doc/sage/html/en && find . -name "*.html" | xargs sed -i '/class="sidebar-brand-text"/s/Sage [0-9a-z.]* /Sage dev /'; git init && (echo "*.svg binary"; echo "*.pdf binary") >> .gitattributes && (echo ".buildinfo"; echo '*.inv'; echo '.git*'; echo '*.svg'; echo '*.pdf'; echo '*.png'; echo 'searchindex.js') > .gitignore; git add -A && git commit --quiet -m "old")
53+
new_version=$(cat src/VERSION.txt); (cd /sage/local/share/doc/sage/html/en && find . -name "*.html" | xargs sed -i '/class="sidebar-brand-text"/s/Sage [0-9a-z.]* /Sage '$new_version' /'; git init && (echo "*.svg binary"; echo "*.pdf binary") >> .gitattributes && (echo ".buildinfo"; echo '*.inv'; echo '.git*'; echo '*.svg'; echo '*.pdf'; echo '*.png'; echo 'searchindex.js') > .gitignore; git add -A && git commit --quiet -m "old")
5454
5555
- name: Incremental build
5656
id: incremental
@@ -97,7 +97,7 @@ jobs:
9797
mkdir -p ./docs
9898
# Create changelog
9999
echo '## Preview of CHANGES.html'
100-
(cd /sage/local/share/doc/sage/html/en && find . -name "*.html" | xargs sed -i '/class="sidebar-brand-text"/s/Sage [0-9a-z.]* /Sage dev /'; git diff --name-only) | tee ./docs/CHANGES.txt
100+
(cd /sage/local/share/doc/sage/html/en && git diff --name-only) | tee ./docs/CHANGES.txt
101101
(cd /sage/local/share/doc/sage/html/en && git diff; rm -rf .git) > ./docs/html.diff
102102
echo '## Preview of html.diff'; head -n 400 ./docs/html.diff
103103
(echo '<p><a href="html.diff">HTML diff</a>'; sed -E 's,(.*),<p><a href="\1">\1</a>,' ./docs/CHANGES.txt) > ./docs/CHANGES.html

0 commit comments

Comments
 (0)