mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-27 13:45:19 -04:00
Manual: Add option to disable edit links for release
This commit is contained in:
parent
64a6e2ead2
commit
5c1914ddd7
3 changed files with 12 additions and 3 deletions
|
|
@ -82,7 +82,8 @@ COPY ./tools/regtesting ./tools/regtesting
|
|||
COPY ./tools/manual ./tools/manual
|
||||
COPY ./tools/input_editing ./tools/input_editing
|
||||
COPY ./tools/docker/scripts/test_manual.sh .
|
||||
RUN ./test_manual.sh 2>&1 | tee report.log
|
||||
ARG ADD_EDIT_LINKS=yes
|
||||
RUN ./test_manual.sh "${ADD_EDIT_LINKS}" 2>&1 | tee report.log
|
||||
|
||||
# Output the report if the image is old and was therefore pulled from the build cache.
|
||||
CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/'
|
||||
|
|
|
|||
|
|
@ -216,7 +216,8 @@ def manual() -> str:
|
|||
COPY ./tools/manual ./tools/manual
|
||||
COPY ./tools/input_editing ./tools/input_editing
|
||||
COPY ./tools/docker/scripts/test_manual.sh .
|
||||
RUN ./test_manual.sh 2>&1 | tee report.log
|
||||
ARG ADD_EDIT_LINKS=yes
|
||||
RUN ./test_manual.sh "${{ADD_EDIT_LINKS}}" 2>&1 | tee report.log
|
||||
"""
|
||||
+ print_cached_report()
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,13 @@
|
|||
|
||||
# author: Ole Schuett
|
||||
|
||||
if (($# != 1)); then
|
||||
echo "Usage: test_manual.sh <ADD_EDIT_LINKS>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ADD_EDIT_LINKS=$1
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source /opt/cp2k-toolchain/install/setup
|
||||
|
||||
|
|
@ -42,7 +49,7 @@ set +e # disable error trapping for remainder of script
|
|||
set -e # abort if error is encountered
|
||||
sed -i 's/\x0/?/g' cp2k_input.xml # replace null bytes which would crash saxon
|
||||
SAXON="java -jar /usr/share/java/Saxon-HE.jar"
|
||||
$SAXON -o:index.html ./cp2k_input.xml ${TOOLS}/manual/cp2k_input.xsl add_edit_links=yes
|
||||
$SAXON -o:index.html ./cp2k_input.xml ${TOOLS}/manual/cp2k_input.xsl add_edit_links="${ADD_EDIT_LINKS}"
|
||||
$SAXON -o:cp2k.vim ./cp2k_input.xml ${TOOLS}/input_editing/vim/vim.xsl
|
||||
)
|
||||
EXIT_CODE=$?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue