XComp commented on code in PR #21501:
URL: https://github.com/apache/flink/pull/21501#discussion_r1054411775
##########
docs/setup_docs.sh:
##########
@@ -42,6 +42,10 @@ function integrate_connector_docs {
theme_dir="../themes/connectors"
mkdir -p "${theme_dir}"
rsync -a flink-connector-${connector}/docs/content* "${theme_dir}/"
+ DIR=flink-connector-${connector}/docs/layouts;
+ if [ -e $DIR ];
+ then rsync -a flink-connector-${connector}/docs/layouts* "${theme_dir}/"
+ fi
Review Comment:
Shouldn't we make this then a parameter instead of hardcoding it in the
function? WDYT? (please double-check the correctness of the bash code
:innocent: )
```
function integrate_connector_docs {
local connector ref additional_folders
connector=$1
ref=$2
additional_folders=( "${@[@]:3}" )
git clone --single-branch --branch "${ref}"
"https://github.com/apache/flink-connector-${connector}"
theme_dir="../themes/connectors"
mkdir -p "${theme_dir}"
for rsync_folder_subpath in "docs/content*" "${additional_folders[@]}"; do
local
rsync_source_path="flink-connector-${connector}/${rsync_folder_subpath}"
[ -e "${rsync_source_path}" ] || echo "Error: Invalid sub-path
${rsync_folder_subpath}! Folder does not exist." && exit 1
rsync -a "flink-connector-${connector}/${rsync_folder_subpath}"
"${theme_dir}/"
done
}
# Integrate the connector documentation
rm -rf themes/connectors/*
rm -rf tmp
mkdir tmp
cd tmp
integrate_connector_docs elasticsearch v3.0.0
integrate_connector_docs aws v3.0.0
integrate_connector_docs cassandra v3.0.0
integrate_connector_docs pulsar main "docs/layouts*"
# [...]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]