File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ cd github/google-cloud-go/internal/godocfx
23
23
go install -buildvcs=false
24
24
cd -
25
25
26
+ # Use the google-cloud-go service account to store godocfx state.
26
27
export GOOGLE_APPLICATION_CREDENTIALS=$KOKORO_KEYSTORE_DIR /72523_go_integration_service_account
27
28
# Keep GCLOUD_TESTS_GOLANG_PROJECT_ID in sync with continuous.sh.
28
29
export GCLOUD_TESTS_GOLANG_PROJECT_ID=dulcet-port-762
37
38
godocfx -project $GCLOUD_TESTS_GOLANG_PROJECT_ID -new-modules cloud.google.com/go google.golang.org/appengine
38
39
fi
39
40
41
+ # Use the docuploader service account to upload docs.
42
+ gcloud auth activate-service-account --key-file " $KOKORO_KEYSTORE_DIR /73713_docuploader_service_account"
43
+
40
44
for f in $( find obj/api -name docs.metadata) ; do
41
45
d=$( dirname $f )
42
- cd $d
43
- python3 -m docuploader upload \
44
- --staging-bucket docs-staging-v2 \
45
- --destination-prefix docfx \
46
- --credentials " $KOKORO_KEYSTORE_DIR /73713_docuploader_service_account" \
46
+ # Extract the module and version from the docs.metadata file.
47
+ module=$( cat $d /docs.metadata | grep name | sed ' s/.*"\(.*\)"/\1/' )
48
+ version=$( cat $d /docs.metadata | grep version | sed ' s/.*"\(.*\)"/\1/' )
49
+ name=" docfx-go-$module -$version .tar.gz"
50
+ mkdir -p $( dirname $name )
51
+ tar \
52
+ --create \
53
+ --directory=$d \
54
+ --file=$name \
55
+ --gzip \
47
56
.
48
- cd -
57
+ gsutil cp $name gs://docs-staging-v2
49
58
done
You can’t perform that action at this time.
0 commit comments