Skip to content

Commit

Permalink
Refs #20631. Fix getting fastdds branch in readthedocs
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
  • Loading branch information
richiware committed Apr 19, 2024
1 parent c26e864 commit 5a38fad
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,15 @@ def get_git_branch():
# Invoke git to get the current branch which we use to get the theme
try:
p = subprocess.Popen(
['git', 'rev-parse', '--abbrev-ref', 'HEAD'],
['git', 'rev-parse', '--verify', 'HEAD'],
stdout=subprocess.PIPE,
cwd=path_to_here
)

commit = p.communicate()[0].decode().rstrip()

p = subprocess.Popen(
['git', 'name-rev', '--name-only', commit],
stdout=subprocess.PIPE,
cwd=path_to_here
)
Expand Down

0 comments on commit 5a38fad

Please sign in to comment.