Skip to content

Commit

Permalink
feat: define exclude_pattern per version (#1145)
Browse files Browse the repository at this point in the history
* feat: define exclude_pattern per version

* fix: update key

* fix: test changes with real repo
  • Loading branch information
dgarcia360 authored Jul 30, 2024
1 parent 06ae8c3 commit d74b342
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
9 changes: 4 additions & 5 deletions extensions/sphinx-multiversion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Here's an example:
smv_latest_version = 'x.y.z' # Use the branch/tag name
smv_rename_latest_version = 'latest' # Use the commit hash
```

### Add support for custom tags

See https://github.com/dgarcia360/sphinx-multiversion/pull/4
Expand All @@ -54,12 +53,12 @@ See https://github.com/scylladb/scylla-enterprise/issues/3414

See https://github.com/scylladb/sphinx-scylladb-theme/pull/891

## Maintenance
### Version specific overrides

This fork will be maintained until the following issues are solved:
The following properties can be defined on a per-version basis.

- https://github.com/Holzhaus/sphinx-multiversion/issues/45
- https://github.com/Holzhaus/sphinx-multiversion/issues/65
* `rst_prolog`
* `exclude_patterns`: Introduced in 0.3.2

## License

Expand Down
2 changes: 1 addition & 1 deletion extensions/sphinx-multiversion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
author="Jan Holthuis",
author_email="holthuis.jan@googlemail.com",
url="https://holzhaus.github.io/sphinx-multiversion/",
version="0.3.1",
version="0.3.2",
install_requires=["sphinx >= 2.1"],
license="BSD",
packages=["sphinx_multiversion"],
Expand Down
1 change: 1 addition & 0 deletions extensions/sphinx-multiversion/sphinx_multiversion/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ def main(argv=None):
"version": current_config.version,
"release": current_config.release,
"rst_prolog": current_config.rst_prolog,
"exclude_patterns": current_config.exclude_patterns,
"is_released": bool(
re.match(config.smv_released_pattern, gitref.refname)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def config_inited(app, config):
config.version = data["version"]
config.release = data["release"]
config.rst_prolog = data["rst_prolog"]
config.exclude_patterns = data["exclude_patterns"]
config.today = old_config.today
if not config.today:
config.today = sphinx_i18n.format_date(
Expand Down

0 comments on commit d74b342

Please sign in to comment.