fix GH release badges (#5040)

* fix GH release badges

* rtd
This commit is contained in:
Jirka Borovec 2020-12-09 15:53:49 +01:00 committed by GitHub
parent ef8ef12fd0
commit cff2489c6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -169,10 +169,11 @@ def _load_long_description(path_dir: str) -> str:
# readthedocs badge
text = text.replace('badge/?version=stable', f'badge/?version={__version__}')
text = text.replace('pytorch-lightning.readthedocs.io/en/stable/', f'pytorch-lightning.readthedocs.io/en/{__version__}')
# codecov badge
text = text.replace('/branch/master/graph/badge.svg', f'/release/{__version__}/graph/badge.svg')
# replace github badges for release ones
text = text.replace('badge.svg?branch=master&event=push', f'badge.svg?branch={__version__}&event=release')
text = text.replace('badge.svg?branch=master&event=push', f'badge.svg?tag={__version__}')
# # https://github.com/Borda/pytorch-lightning/releases/download/1.1.0a6/codecov_badge.png
# github_release_url = os.path.join(__homepage__, "releases", "download", __version__)