Have the repo primary branch configurable for docs

This commit is contained in:
Pedro Algarvio 2019-10-24 16:56:06 +01:00
parent 088849ab5a
commit adef6a4a17
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF

View file

@ -253,7 +253,7 @@ intersphinx_mapping = {
on_saltstack = 'SALT_ON_SALTSTACK' in os.environ
project = 'Salt'
primary_repo_branch = 'master' # This is the default branch on GitHub for the Salt project
version = salt.version.__version__
latest_release = '2019.2.2' # latest release
previous_release = '2018.3.4' # latest release from previous branch
@ -326,6 +326,7 @@ stripped_release = re.sub(r'-\d+-g[0-9a-f]+$', '', release)
# Define a substitution for linking to the latest release tarball
rst_prolog = """\
.. |primary_repo_branch| replace:: {primary_repo_branch}
.. |current_release_doc| replace:: :doc:`/topics/releases/{release}`
.. |saltrepo| replace:: https://github.com/saltstack/salt
.. _`salt-users`: https://groups.google.com/forum/#!forum/salt-users
@ -360,7 +361,7 @@ rst_prolog = """\
<p>x86_64: <a href="https://repo.saltstack.com/osx/salt-{release}-py3-x86_64.pkg"><strong>salt-{release}-py3-x86_64.pkg</strong></a>
| <a href="https://repo.saltstack.com/osx/salt-{release}-py3-x86_64.pkg.md5"><strong>md5</strong></a></p>
""".format(release=stripped_release)
""".format(release=stripped_release, primary_repo_branch=primary_repo_branch)
# A shortcut for linking to tickets on the GitHub issue tracker
extlinks = {