Skip to content

Commit 78c6607

Browse files
committed
Update version.sh
1 parent 4313520 commit 78c6607

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

version.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,26 @@ git fetch --all --tags
3535

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

43+
echo "Switching to tag $tag..."
44+
git checkout $tag
45+
if [ $? -ne 0 ]; then
46+
echo "Failed to switch to tag $tag. Skipping..."
47+
continue
48+
fi
49+
50+
# Generate the Sphinx documentation for the tag
4351
case $tag in
4452
v0.1.0)
45-
git checkout $tag
4653
python docs/update_quairkit_rst.py
4754
sphinx-build docs/sphinx_src docs/api/$tag
4855
rm -rf docs/sphinx_src
4956
;;
5057
v0.2.0 | *)
51-
git checkout $tag
5258
python docs/update_quairkit_rst.py
5359
cp -r tutorials docs/sphinx_src/
5460
sphinx-build docs/sphinx_src docs/api/$tag

0 commit comments

Comments
 (0)