-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better handle
setuptools_scm
versioning (#4926)
* Use setuptools_scm release-branch-semver version_scheme. * Properly handle all possible scm-rtd combinations. * What's new entry. * Use git stash to protect setuptools_scm from RTD. * Better version badges. * Better use of git stash. * Substitute commit SHAs in place of versions where appropriate. * Make rtd_version safe for use in shields.io badges. * Make rtd_version safe for use in shields.io badges.
- Loading branch information
1 parent
9ca6ce4
commit 4a7304f
Showing
5 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
{% if on_rtd %} | ||
{% if rtd_version == 'latest' %} | ||
<span title="latest development version"> | ||
<img src="https://img.shields.io/badge/latest_version-{{ version }}-orange?style=flat"> | ||
<img src="https://img.shields.io/badge/⚠️_version_('latest')-{{ version }}-gold?style=flat"> | ||
</span> | ||
{% elif rtd_version == 'stable' %} | ||
<span title="stable version"> | ||
<img src="https://img.shields.io/badge/stable_version-{{ version }}-green?style=flat"> | ||
<img src="https://img.shields.io/badge/✨️_version_('stable')-{{ version }}-green?style=flat"> | ||
</span> | ||
{% elif rtd_version_type == 'tag' %} | ||
{# Covers builds for specific tags, including RC's. #} | ||
<span title="archived version (not 'stable' or 'latest')"> | ||
<img src="https://img.shields.io/badge/🔒_version_(archived)-{{ version }}-red?style=?style=flat"> | ||
</span> | ||
{% else %} | ||
<span title="old version (not stable or latest)"> | ||
<img src="https://img.shields.io/badge/old_version-{{ version }}-red?style=?style=flat"> | ||
{# Anything else build by RTD will be the HEAD of an activated branch #} | ||
<span title="non-tagged branch commit"> | ||
<img src="https://img.shields.io/badge/🚧_branch-{{ rtd_version }}_@_{{ commit_sha }}-blue?style=?style=flat"> | ||
</span> | ||
{% endif %} | ||
{%- else %} | ||
{# not on rtd #} | ||
<span title="development version"> | ||
<img src="https://img.shields.io/badge/dev_version-{{ version }}-blue?style=?style=flat"> | ||
<span title="non-tagged development commit"> | ||
<img src="https://img.shields.io/badge/🚧_commit_SHA-{{ commit_sha }}-blue?style=?style=flat"> | ||
</span> | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters