mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Readme: fix external docs/build links
* The default (GitHub) readme should point to the stable docs version, rather than the latest development version. * The frozen links in PyPI should use the full patch version number (X.Y.Z), not just the minor X.Y version. (Leftover from Djrill's branch-based version management; Anymail uses tags for versions, and old way was creating incorrect frozen doc links for patch releases.)
This commit is contained in:
@@ -57,13 +57,14 @@ Anymail releases follow `semantic versioning <http://semver.org/>`_.
|
|||||||
:target: https://travis-ci.org/anymail/django-anymail
|
:target: https://travis-ci.org/anymail/django-anymail
|
||||||
:alt: build status on Travis-CI
|
:alt: build status on Travis-CI
|
||||||
|
|
||||||
.. image:: https://readthedocs.org/projects/anymail/badge/?version=latest
|
.. image:: https://readthedocs.org/projects/anymail/badge/?version=stable
|
||||||
:target: https://anymail.readthedocs.io/en/latest/
|
:target: https://anymail.readthedocs.io/en/stable/
|
||||||
:alt: documentation on ReadTheDocs
|
:alt: documentation on ReadTheDocs
|
||||||
|
|
||||||
**Resources**
|
**Resources**
|
||||||
|
|
||||||
* Full documentation: https://anymail.readthedocs.io/en/latest/
|
* Full documentation: https://anymail.readthedocs.io/en/stable/
|
||||||
|
(`development version <https://anymail.readthedocs.io/en/latest/>`_)
|
||||||
* Package on PyPI: https://pypi.python.org/pypi/django-anymail
|
* Package on PyPI: https://pypi.python.org/pypi/django-anymail
|
||||||
* Project on Github: https://github.com/anymail/django-anymail
|
* Project on Github: https://github.com/anymail/django-anymail
|
||||||
|
|
||||||
@@ -151,5 +152,5 @@ or SparkPost or any other supported ESP where you see "mailgun":
|
|||||||
.. END quickstart
|
.. END quickstart
|
||||||
|
|
||||||
|
|
||||||
See the `full documentation <https://anymail.readthedocs.io/en/latest/>`_
|
See the `full documentation <https://anymail.readthedocs.io/en/stable/>`_
|
||||||
for more features and options.
|
for more features and options.
|
||||||
|
|||||||
12
setup.py
12
setup.py
@@ -11,12 +11,12 @@ with open("anymail/_version.py") as f:
|
|||||||
|
|
||||||
|
|
||||||
def long_description_from_readme(rst):
|
def long_description_from_readme(rst):
|
||||||
# Freeze external links to refer to this X.Y version (on PyPI).
|
# Freeze external links (on PyPI) to refer to this X.Y or X.Y.Z tag.
|
||||||
# (This relies on tagging or branching releases with 'vX.Y' in GitHub.)
|
# (This relies on tagging releases with 'vX.Y' or 'vX.Y.Z' in GitHub.)
|
||||||
release = 'v%s' % __minor_version__ # vX.Y
|
release = 'v%s' % __version__ # vX.Y or vX.Y.Z
|
||||||
rst = re.sub(r'(?<=branch=)master' # Travis build status: branch=master --> branch=vX.Y
|
rst = re.sub(r'(?<=branch=)master' # Travis build status: branch=master --> branch=vX.Y.Z
|
||||||
r'|(?<=/)latest' # ReadTheDocs links: /latest --> /vX.Y
|
r'|(?<=/)stable' # ReadTheDocs links: /stable --> /vX.Y.Z
|
||||||
r'|(?<=version=)latest', # ReadTheDocs badge: version=latest --> version=vX.Y
|
r'|(?<=version=)stable', # ReadTheDocs badge: version=stable --> version=vX.Y.Z
|
||||||
release, rst) # (?<=...) is "positive lookbehind": must be there, but won't get replaced
|
release, rst) # (?<=...) is "positive lookbehind": must be there, but won't get replaced
|
||||||
return rst
|
return rst
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user