Skip to content

Commit 3645eb1

Browse files
authored
pypi azure badges - tags (Lightning-AI#6068)
* pypi azure badges - tags * pep8 * id
1 parent e12c8a7 commit 3645eb1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pytorch_lightning/setup_tools.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ def _load_readme_description(path_dir: str, homepage: str = __homepage__, versio
6565
text = text.replace('/branch/master/graph/badge.svg', f'/release/{version}/graph/badge.svg')
6666
# replace github badges for release ones
6767
text = text.replace('badge.svg?branch=master&event=push', f'badge.svg?tag={version}')
68+
# Azure...
69+
text = text.replace('?branchName=master', f'?branchName=refs%2Ftags%2F{version}')
70+
text = re.sub(r'\?definitionId=\d+&branchName=master', f'?definitionId=2&branchName=refs%2Ftags%2F{version}', text)
6871

6972
skip_begin = r'<!-- following section will be skipped from PyPI description -->'
7073
skip_end = r'<!-- end skipping PyPI description -->'

0 commit comments

Comments
 (0)