Skip to content

Commit

Permalink
Update version.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tengxianglin committed Nov 14, 2024
1 parent 4313520 commit 78c6607
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,26 @@ git fetch --all --tags

# Loop through all tags and generate Sphinx documentation for each with specific conditions
for tag in "${tags[@]}"; do
# Skip the "latest" version if it exists in the tags
# Skip the "latest" tag
if [ "$tag" == "latest" ]; then
continue
fi

echo "Switching to tag $tag..."
git checkout $tag
if [ $? -ne 0 ]; then
echo "Failed to switch to tag $tag. Skipping..."
continue
fi

# Generate the Sphinx documentation for the tag
case $tag in
v0.1.0)
git checkout $tag
python docs/update_quairkit_rst.py
sphinx-build docs/sphinx_src docs/api/$tag
rm -rf docs/sphinx_src
;;
v0.2.0 | *)
git checkout $tag
python docs/update_quairkit_rst.py
cp -r tutorials docs/sphinx_src/
sphinx-build docs/sphinx_src docs/api/$tag
Expand Down

0 comments on commit 78c6607

Please sign in to comment.