Merge branch 'doc/view_github_link' into 'master'
docs: add 'edit-on-github' link to html theme Closes IDF-1504 See merge request espressif/esp-idf!8629
This commit is contained in:
@@ -8,19 +8,7 @@ import subprocess
|
||||
from docutils import nodes
|
||||
from collections import namedtuple
|
||||
from sphinx.transforms.post_transforms import SphinxPostTransform
|
||||
|
||||
|
||||
def get_github_rev():
|
||||
path = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode('utf-8')
|
||||
try:
|
||||
tag = subprocess.check_output(['git', 'describe', '--exact-match']).strip().decode('utf-8')
|
||||
except subprocess.CalledProcessError:
|
||||
tag = None
|
||||
print('Git commit ID: ', path)
|
||||
if tag:
|
||||
print('Git tag: ', tag)
|
||||
return tag
|
||||
return path
|
||||
from get_github_rev import get_github_rev
|
||||
|
||||
|
||||
# Creates a dict of all submodules with the format {submodule_path : (url relative to git root), commit)}
|
||||
|
||||
Reference in New Issue
Block a user