Merge branch 'doc/local_build_version_note_v4.2' into 'release/v4.2'

docs: fix version specific note on local build (backport v4.2)

See merge request espressif/esp-idf!10148
This commit is contained in:
Krzysztof Budzynski
2020-08-31 21:13:53 +08:00

View File

@ -209,7 +209,7 @@ def get_version():
return (branch, "branch", False)
# Try to find the branch name even if docs are built locally
branch = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).decode('utf-8')
branch = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).strip().decode('utf-8')
if branch != "HEAD":
return (branch, "branch", False)