Skip to content

Commit

Permalink
gh-286: replace stable in docs with tag for sdist (#416)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Tessore <[email protected]>
  • Loading branch information
paddyroddy and ntessore authored Nov 15, 2024
1 parent a7c795a commit d4b07f7
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Replace stable version with the release version
run: |-
# store the release tag
tag="${{ github.ref_name }}"
# regex patterns
badge_pattern="s#(readthedocs\.org/projects/glass/badge/\?version=)stable#\1${tag}#g"
url_pattern="s#(glass\.readthedocs\.io.*?)/stable#\1/${tag}#g"
# perform the replacements
sed --in-place --regexp-extended \
--expression "$badge_pattern" \
--expression "$url_pattern" \
${{ github.workspace }}/README.md
- name: Build SDist and wheel
run: pipx run build

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ rendering documentation on its website. The configuration file (`conf.py`) for
`sphinx` can be found
[under the `docs` folder](https://github.com/glass-dev/glass/blob/main/docs/conf.py).
The documentation is deployed on <https://readthedocs.io>
[here](https://glass.readthedocs.io/en/latest/).
[here](https://glass.readthedocs.io/latest/).

Ideally, with the addition of every new feature to _GLASS_, documentation should
be added using comments, docstrings, and `.rst` files.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Essentials -->

[![PyPI](https://img.shields.io/pypi/v/glass)](https://pypi.org/project/glass)
[![Documentation](https://readthedocs.org/projects/glass/badge/?version=latest)](https://glass.readthedocs.io/latest)
[![Documentation](https://readthedocs.org/projects/glass/badge/?version=stable)](https://glass.readthedocs.io/stable)
[![LICENSE](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

<!-- Code -->
Expand Down Expand Up @@ -80,7 +80,7 @@ e.g. a design decision or API change, you can use our [Discussions] page.

We also have a public [Slack workspace] for discussions about the project.

[documentation]: https://glass.readthedocs.io/
[examples]: https://glass.readthedocs.io/projects/examples/
[documentation]: https://glass.readthedocs.io/stable
[examples]: https://glass.readthedocs.io/stable/examples.html
[Discussions]: https://github.com/orgs/glass-dev/discussions
[Slack workspace]: https://glass-dev.github.io/slack
4 changes: 1 addition & 3 deletions docs/manual/first-steps.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
First steps
===========

The best way to get started with *GLASS* is to follow the examples__.

__ https://glass.readthedocs.io/projects/examples/
The best way to get started with *GLASS* is to follow the :doc:`/examples`.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ test = [

[project.urls]
Changelog = "https://glass.readthedocs.io/stable/manual/releases.html"
Documentation = "https://glass.readthedocs.io/"
Documentation = "https://glass.readthedocs.io/stable"
Homepage = "https://github.com/glass-dev/glass"
Issues = "https://github.com/glass-dev/glass/issues"

Expand Down

0 comments on commit d4b07f7

Please sign in to comment.