mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-11-23 13:19:48 +00:00
docs: link to correct tag
This commit is contained in:
parent
55cb2a8547
commit
072fff90f1
21
docs/conf.py
21
docs/conf.py
@ -1,7 +1,9 @@
|
||||
import sys
|
||||
import os
|
||||
import importlib
|
||||
import inspect
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
import netlib.version
|
||||
|
||||
@ -194,11 +196,20 @@ html_show_sourcelink = False
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'mitmproxydoc'
|
||||
|
||||
last_tag, tag_dist, commit = (
|
||||
subprocess.check_output(["git", "describe", "--tags", "--long"])
|
||||
.decode()
|
||||
.strip()
|
||||
.rsplit("-", 2)
|
||||
)
|
||||
tag_dist = int(tag_dist)
|
||||
if tag_dist == 0:
|
||||
tag = last_tag
|
||||
else:
|
||||
tag = "master"
|
||||
|
||||
SRCBASE = "https://github.com/mitmproxy/mitmproxy/blob/master"
|
||||
SRCBASE = "https://github.com/mitmproxy/mitmproxy/blob/{}".format(tag)
|
||||
|
||||
|
||||
# FIXME: change master to dynamic version before release
|
||||
extlinks = dict(
|
||||
src = (SRCBASE + r"/%s", '')
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user