Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions build_submodules.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -xe
set -xe -o pipefail -o nounset

project_root=$(pwd)

Expand Down Expand Up @@ -31,14 +31,14 @@ cartridge_pot_src="${cartridge_root}/build.luarocks/build.rst/locale"
cartridge_pot_dest="${project_root}/locale/book/cartridge"
cd "${cartridge_pot_src}" || exit
mkdir -p "${cartridge_pot_dest}"
find . -name '*.pot' -exec cp -r --parents {} "${cartridge_pot_dest}" \;
find . -name '*.pot' -exec cp -rv --parents {} "${cartridge_pot_dest}" \;

# Copy translations
cartridge_po_src="${cartridge_root}/build.luarocks/build.rst/locale/ru/LC_MESSAGES"
cartridge_po_dest="${po_dest}/book/cartridge"
cd "${cartridge_po_src}" || exit
mkdir -p "${cartridge_po_dest}"
find . -name '*.po' -exec cp -r --parents {} "${cartridge_po_dest}" \;
find . -name '*.po' -exec cp -rv --parents {} "${cartridge_po_dest}" \;


# Cartridge CLI
Expand Down Expand Up @@ -67,8 +67,8 @@ monitoring_grafana_root="${project_root}/modules/grafana-dashboard/doc/monitorin

# Copy monitoring docs to the right destination
mkdir -p "${monitoring_dest}"
yes | cp -rf "${monitoring_root}" "${monitoring_dest}/"
yes | cp -rf "${monitoring_grafana_root}" "${monitoring_dest}/"
cp -rfv "${monitoring_root}" "${monitoring_dest}/"
cp -rfv "${monitoring_grafana_root}" "${monitoring_dest}/"


# Luatest
Expand All @@ -81,10 +81,10 @@ ldoc --ext=rst --dir=rst --toctree="API" .

# Copy Luatest docs to the right place
cd "${luatest_dest}"
yes | cp -fa "${luatest_root}/rst/." "${luatest_dest}"
yes | cp "${luatest_root}/README.rst" "${luatest_dest}"
cp -fa "${luatest_root}/rst/." "${luatest_dest}"
cp "${luatest_root}/README.rst" "${luatest_dest}"
mkdir -p "${luatest_dest}/_includes/"
yes | mv -f "${luatest_dest}/index.rst" "${luatest_dest}/_includes/"
mv -fv "${luatest_dest}/index.rst" "${luatest_dest}/_includes/"


# Kubernetes operator
Expand All @@ -93,7 +93,7 @@ cartridge_kubernetes_dest="${cartridge_rst_dest}/"

# Copy Kubernetes operator docs to the right place
mkdir -p "${cartridge_kubernetes_dest}"
yes | cp -rf "${cartridge_kubernetes_root}" "${cartridge_kubernetes_dest}"
cp -rfv "${cartridge_kubernetes_root}" "${cartridge_kubernetes_dest}"


# Tarantool C++ connector
Expand All @@ -104,6 +104,6 @@ tntcxx_api_dest="${project_root}/doc/book/connectors"
# Copy Tarantool C++ connector docs to the right places
mkdir -p "${tntcxx_api_dest}/cxx/"
mkdir -p "${tntcxx_gs_dest}/_includes"
yes | cp -rf "${tntcxx_root}/doc/tntcxx_getting_started.rst" "${tntcxx_gs_dest}/getting_started_cxx.rst"
yes | cp -rf "${tntcxx_root}/examples/" "${tntcxx_gs_dest}/_includes/examples/"
yes | cp -rf "${tntcxx_root}/doc/tntcxx_api.rst" "${tntcxx_api_dest}/cxx/"
cp -rfv "${tntcxx_root}/doc/tntcxx_getting_started.rst" "${tntcxx_gs_dest}/getting_started_cxx.rst"
cp -rfv "${tntcxx_root}/examples/" "${tntcxx_gs_dest}/_includes/examples/"
cp -rfv "${tntcxx_root}/doc/tntcxx_api.rst" "${tntcxx_api_dest}/cxx/"
15 changes: 12 additions & 3 deletions upload_output.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -xe -o pipefail -o nounset

BRANCH=$BRANCH_NAME
ENDPOINT_URL=$S3_ENDPOINT_URL
S3_PATH=$S3_UPLOAD_PATH
Expand All @@ -13,18 +15,25 @@ aws s3 sync output/json/_build_en/json/_images $S3_PATH/$BRANCH/images_en --endp
aws s3 sync output/json/_build_ru/json/_images $S3_PATH/$BRANCH/images_ru --endpoint-url=$ENDPOINT_URL --delete --size-only

# upload pdf files
aws s3 cp --acl public-read output/_latex_en/Tarantool.pdf $S3_PATH/$BRANCH/Tarantool-en.pdf --endpoint-url=$ENDPOINT_URL
aws s3 cp --acl public-read output/_latex_ru/Tarantool.pdf $S3_PATH/$BRANCH/Tarantool-ru.pdf --endpoint-url=$ENDPOINT_URL
if [ -f output/_latex_en/Tarantool.pdf ]; then
aws s3 cp --acl public-read output/_latex_en/Tarantool.pdf $S3_PATH/$BRANCH/Tarantool-en.pdf --endpoint-url=$ENDPOINT_URL
fi
if [ -f output/_latex_ru/Tarantool.pdf ]; then
aws s3 cp --acl public-read output/_latex_ru/Tarantool.pdf $S3_PATH/$BRANCH/Tarantool-ru.pdf --endpoint-url=$ENDPOINT_URL
fi

# upload singlehtml and assets
if [ -f output/html/en/singlehtml.html ]; then
aws s3 sync --acl public-read output/html/en/_static $S3_PATH/$BRANCH/en/_static --endpoint-url=$ENDPOINT_URL --delete --size-only
aws s3 sync --acl public-read output/html/en/_images $S3_PATH/$BRANCH/en/_images --endpoint-url=$ENDPOINT_URL --delete --size-only
aws s3 cp --acl public-read output/html/en/singlehtml.html $S3_PATH/$BRANCH/en/singlehtml.html --endpoint-url=$ENDPOINT_URL
fi
if [ -f output/html/ru/singlehtml.html ]; then
aws s3 sync --acl public-read output/html/ru/_static $S3_PATH/$BRANCH/ru/_static --endpoint-url=$ENDPOINT_URL --delete --size-only
aws s3 sync --acl public-read output/html/ru/_images $S3_PATH/$BRANCH/ru/_images --endpoint-url=$ENDPOINT_URL --delete --size-only
aws s3 cp --acl public-read output/html/ru/singlehtml.html $S3_PATH/$BRANCH/ru/singlehtml.html --endpoint-url=$ENDPOINT_URL
fi

set -xe
curl --fail --show-error \
--data '{"update_key":"'"$TARANTOOL_UPDATE_KEY"'"}' \
--header "Content-Type: application/json" \
Expand Down