Skip to content

Commit 5d6eed6

Browse files
committed
Refs #20631. Fix getting fastdds branch in readthedocs
Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
1 parent c26e864 commit 5d6eed6

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

docs/conf.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,15 @@ def get_git_branch():
102102
# Invoke git to get the current branch which we use to get the theme
103103
try:
104104
p = subprocess.Popen(
105-
['git', 'rev-parse', '--abbrev-ref', 'HEAD'],
105+
['git', 'rev-parse', '--verify', 'HEAD'],
106+
stdout=subprocess.PIPE,
107+
cwd=path_to_here
108+
)
109+
110+
commit = p.communicate()[0].decode().rstrip()
111+
112+
p = subprocess.Popen(
113+
['git', 'name-rev', '--name-only', commit],
106114
stdout=subprocess.PIPE,
107115
cwd=path_to_here
108116
)

0 commit comments

Comments
 (0)