2020-04-05 20:49:27 +02:00
|
|
|
#!/bin/bash
|
2018-05-06 02:20:25 +02:00
|
|
|
|
2020-04-05 20:49:27 +02:00
|
|
|
if [[ -z "$BASEHREF_VERSION" ]]; then
|
|
|
|
echo "Example of use: \"BASEHREF_VERSION=2.12.0 ${0}\"" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Replace version from "stable" to the specified one in all Javadoc links
|
2020-04-05 21:34:10 +02:00
|
|
|
grep -rl '/en/stable/' ./src | xargs sed -i -e 's|/en/stable/|/en/'${BASEHREF_VERSION}'/|g'
|
2020-04-05 20:49:27 +02:00
|
|
|
|
|
|
|
# Generate JavaDoc
|
2018-05-06 02:20:25 +02:00
|
|
|
mvn javadoc:javadoc
|
|
|
|
rm -rf ../../openvidu.io/api/openvidu-java-client/*
|
2020-03-21 23:30:14 +01:00
|
|
|
cp -R ./target/site/apidocs/. ../../openvidu.io-docs/docs/api/openvidu-java-client
|
2018-07-23 11:05:24 +02:00
|
|
|
|
2020-04-05 20:49:27 +02:00
|
|
|
# Return links to "stable" version
|
2020-04-05 21:34:10 +02:00
|
|
|
grep -rl '/en/'${BASEHREF_VERSION}'/' ./src | xargs sed -i -e 's|/en/'${BASEHREF_VERSION}'/|/en/stable/|g'
|
2020-04-05 20:49:27 +02:00
|
|
|
|
2018-07-23 11:05:24 +02:00
|
|
|
# Add favicon to index.html
|
2020-04-05 20:49:27 +02:00
|
|
|
sed -i -e 's/<head>/<head><link rel=\"shortcut icon\" href=\"\/img\/favicon.ico\" type=\"image\/x-icon\">/g' ../../openvidu.io-docs/docs/api/openvidu-java-client/index.html
|