This repository was archived by the owner on Mar 26, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,16 +36,23 @@ python3 -m pip install recommonmark
3636# Required for some client libraries:
3737python3 -m pip install --user django==2.2 ipython
3838
39+ # Store the contents of bucket log in a variable to reuse.
40+ python_bucket_items=$( gsutil ls " gs://docs-staging-v2/docfx-python*" )
3941# Retrieve unique repositories to regenerate the YAML with.
40- for bucket_item in $( gsutil ls ' gs://docs-staging-v2/docfx-python* ' | sort -u -t- -k5,5 ) ; do
42+ for package in $( echo " ${python_bucket_items} " | cut -d " - " -f 5- | rev | cut -d " - " -f 2- | rev | uniq ) ; do
4143
42- # Retrieve the GitHub Repository info.
44+ # Extract the latest version of the package to grab latest metadata.
45+ version=$( echo " ${python_bucket_items} " | grep " docfx-python-${package} -" | rev | cut -d " -" -f 1 | rev | sort -V -r | head -1)
46+
47+ # Set the bucket and tarball values to be used for the package.
48+ bucket_item=$( echo " gs://docs-staging-v2/docfx-python-${package} -${version} " )
4349 tarball=$( echo ${bucket_item} | cut -d " /" -f 4)
4450
4551 # Make temporary directory to extract tarball content.
4652 mkdir ${tarball}
4753 cd ${tarball}
4854
55+ # Retrieve the GitHub Repository info.
4956 gsutil cp ${bucket_item} .
5057 tar -zxvf ${tarball}
5158 repo=$( cat docs.metadata | grep " github_repository:" | cut -d " \" " -f 2 | cut -d " /" -f 2)
You can’t perform that action at this time.
0 commit comments