Skip to content

Commit 7ec0b41

Browse files
committed
script
1 parent 6d90d79 commit 7ec0b41

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

.readthedocs.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@ build:
33
os: ubuntu-22.04
44
tools:
55
python: "3.13"
6-
apt_packages:
7-
- default-jre
86
jobs:
9-
# Install PlantUML
107
pre_install:
11-
- curl -o ${READTHEDOCS_VIRTUALENV_PATH}/bin/plantuml.jar -L https://github.com/plantuml/plantuml/releases/latest/download/plantuml.jar
12-
- bash -c "echo -e '#!/bin/bash\nexec java -Djava.awt.headless=true -jar ${READTHEDOCS_VIRTUALENV_PATH}/bin/plantuml.jar \"\$@\"' > ${READTHEDOCS_VIRTUALENV_PATH}/bin/plantuml"
13-
- chmod +x ${READTHEDOCS_VIRTUALENV_PATH}/bin/plantuml
8+
- bash scripts/rtd_pre_install.sh
149

1510
sphinx:
1611
configuration: doc/conf.py

scripts/rtd_pre_install.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Stop and exit on error
4+
set -euox pipefail
5+
6+
# Check for required tools
7+
java -version
8+
9+
# This folder is on PATH and does not require sudo
10+
# Download latest plantuml.jar from github
11+
curl -o ${READTHEDOCS_VIRTUALENV_PATH}/bin/plantuml.jar -L https://github.com/plantuml/plantuml/releases/latest/download/plantuml.jar
12+
# Create an executable script for plantuml
13+
printf '#!/bin/bash\nexec java -Djava.awt.headless=true -jar ${READTHEDOCS_VIRTUALENV_PATH}/bin/plantuml.jar "$@"' > ${READTHEDOCS_VIRTUALENV_PATH}/bin/plantuml
14+
chmod +x ${READTHEDOCS_VIRTUALENV_PATH}/bin/plantuml
15+
16+
# Check plantuml version
17+
plantuml -version

0 commit comments

Comments
 (0)