From 1e6534f5873b9750d3ae313f8f445e0072770da7 Mon Sep 17 00:00:00 2001 From: Tyler Bui-Palsulich <26876514+tbpg@users.noreply.github.com> Date: Tue, 24 Oct 2023 09:40:14 -0400 Subject: [PATCH] chore(internal/kokoro): upload docs to subdirectory (#8763) --- internal/kokoro/publish_docs.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/kokoro/publish_docs.sh b/internal/kokoro/publish_docs.sh index 4fbabf1d5968..1b6c85c9a760 100755 --- a/internal/kokoro/publish_docs.sh +++ b/internal/kokoro/publish_docs.sh @@ -42,17 +42,17 @@ fi gcloud auth activate-service-account --key-file "$KOKORO_KEYSTORE_DIR/73713_docuploader_service_account" for f in $(find obj/api -name docs.metadata); do - d=$(dirname $f) - # Extract the module and version from the docs.metadata file. - module=$(cat $d/docs.metadata | grep name | sed 's/.*"\(.*\)"/\1/') - version=$(cat $d/docs.metadata | grep version | sed 's/.*"\(.*\)"/\1/') + # Extract the module name and version from the docs.metadata file. + module=$(cat $f | grep name | sed 's/.*"\(.*\)"/\1/') + version=$(cat $f | grep version | sed 's/.*"\(.*\)"/\1/') name="docfx-go-$module-$version.tar.gz" - mkdir -p $(dirname $name) + tar_dir=$(dirname $name) + mkdir -p $tar_dir tar \ --create \ - --directory=$d \ + --directory=$(dirname $f) \ --file=$name \ --gzip \ . - gsutil cp $name gs://docs-staging-v2 + gsutil cp $name gs://docs-staging-v2/$tar_dir done