@@ -227,11 +227,7 @@ def configure_doxyfile(
227227doxyfile_out = os .path .abspath ('{}/doxygen-config' .format (project_binary_dir ))
228228
229229# Header files
230- input_dir = os .path .abspath (
231- '{}/fastdds/include/fastdds' .format (
232- project_binary_dir
233- )
234- )
230+ input_dir = os .path .abspath ("{}/fastdds/include/fastdds" .format (project_binary_dir ))
235231
236232# Current branch of the documentation repository — resolved once, used everywhere.
237233docs_branch = get_git_branch ()
@@ -293,21 +289,24 @@ def configure_doxyfile(
293289 fastdds_repo_name ,
294290 )
295291
296- # Verify the desired branch actually exists in the cloned remote, falling back to 2.14.x if not.
292+ # Verify the desired branch/tag actually exists in the cloned remote, falling back to master if not.
297293 fastdds_branch = fastdds_fallback_branch
298294 if fastdds .refs .__contains__ ("origin/{}" .format (fastdds_branch )):
299295 fastdds_branch = "origin/{}" .format (fastdds_branch )
296+ elif fastdds .tags .__contains__ (fastdds_branch ):
297+ # GitPython exposes tags by bare name, e.g. "v3.6.2".
298+ pass
300299 else :
301300 print (
302- 'Fast DDS does not have branch "{}"; falling back to 2.14.x' .format (
301+ 'Fast DDS does not have branch or tag "{}"; falling back to 2.14.x' .format (
303302 fastdds_branch
304303 )
305304 )
306305 fastdds_branch = "origin/2.14.x"
307306
308307 # Actual checkout
309308 print ('Checking out Fast DDS branch "{}"' .format (fastdds_branch ))
310- fastdds .refs [ fastdds_branch ] .checkout ()
309+ fastdds .git .checkout (fastdds_branch )
311310
312311 # - Fast DDS Python Bindings
313312 print ('Cloning Fast DDS Python Bindings' )
@@ -316,22 +315,25 @@ def configure_doxyfile(
316315 fastdds_python_repo_name ,
317316 )
318317
319- # Verify the desired branch actually exists in the cloned remote, falling back to 2.14 .x if not.
318+ # Verify the desired branch/tag actually exists in the cloned remote, falling back to 1.4 .x if not.
320319 fastdds_python_branch = fastdds_python_fallback_branch
321320 if fastdds_python .refs .__contains__ ("origin/{}" .format (fastdds_python_branch )):
322321 fastdds_python_branch = "origin/{}" .format (fastdds_python_branch )
322+ elif fastdds_python .tags .__contains__ (fastdds_python_branch ):
323+ # GitPython exposes tags by bare name, e.g. "v3.6.2".
324+ pass
323325 else :
324326 print (
325- 'Fast DDS Python does not have branch "{}"; falling back to 2.14 .x' .format (
327+ 'Fast DDS Python does not have branch or tag "{}"; falling back to 1.4 .x' .format (
326328 fastdds_python_branch
327329 )
328330 )
329- fastdds_python_branch = "origin/2.14 .x"
331+ fastdds_python_branch = "origin/1.4 .x"
330332
331333 # Actual checkout
332334 print ('Checking out Fast DDS Python branch "{}"' .format (
333335 fastdds_python_branch ))
334- fastdds_python .refs [ fastdds_python_branch ] .checkout ()
336+ fastdds_python .git .checkout (fastdds_python_branch )
335337
336338 os .makedirs (os .path .dirname (output_dir ), exist_ok = True )
337339 os .makedirs (os .path .dirname (doxygen_html ), exist_ok = True )
0 commit comments