Skip to content

Commit

Permalink
Include additional docs upload format "xml_tar" (#79)
Browse files Browse the repository at this point in the history
In the ongoing work to consolidate the rendered docs for all graph
repositories (`cugraph`, `cugraph-ops`, `wholegraph`) into one place,
`wholegraph` and `cugraph-ops` c++ docs will be uploaded as xml
tarballs, which will then be consumed during the docs build process for
`cugraph` and ultimately rendered under `cugraph`.

This PR enables the tarball upload.
  • Loading branch information
AyodeAwe authored Sep 28, 2023
1 parent 7d978de commit be5e75a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tools/rapids-upload-docs
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,29 @@ copy_docs_to_s3() {
for PROJECT_FORMAT_DIR in "${PROJECT_DIR}"/*; do
FORMAT=$(basename "${PROJECT_FORMAT_DIR}")

if [[ ! "${FORMAT}" =~ ^(html|txt)$ ]]; then
echo "ERROR: FORMAT must be either 'html' or 'txt'."
if [[ ! "${FORMAT}" =~ ^(html|txt|xml_tar)$ ]]; then
echo "ERROR: FORMAT must be either 'html' or 'txt' or 'xml_tar'."
exit 1
fi

if [[ "${FORMAT}" == "xml_tar" ]]; then
NUM_FILES=$(find "$PROJECT_FORMAT_DIR" -type f | wc -l)
if [[ ! -f "${PROJECT_FORMAT_DIR}/xml.tar.gz" || $NUM_FILES -ne 1 ]]; then
echo "Error: The xml_tar directory should contain a single file named xml.tar.gz."
exit 1
fi
fi

rapids-logger "Uploading ${RAPIDS_VERSION_NUMBER} ${PROJECT} ${FORMAT} docs to S3."

ACL_OPTION="private"
if [[ "$FORMAT" == "xml_tar" ]]; then
ACL_OPTION="public-read"
fi
aws s3 sync \
--no-progress \
--delete \
--acl "${ACL_OPTION}" \
"${PROJECT_FORMAT_DIR}" \
"$(get_s3_dest "${PROJECT}" "${FORMAT}")"
echo ""
Expand Down

0 comments on commit be5e75a

Please sign in to comment.