Skip to content

Commit

Permalink
chore: Replace bumpversion with bumpver (#278)
Browse files Browse the repository at this point in the history
* chore: Replace bumpversion with bumpver
* ci: Rename devel to main for doc
* doc: Fix README.md
  • Loading branch information
gmuloc authored Jul 19, 2023
1 parent 6a574e4 commit 8209902
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 33 deletions.
20 changes: 0 additions & 20 deletions .bumpversion.cfg

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# This is deploying the latest commits on main to devel documentation
# This is deploying the latest commits on main to main documentation
name: Mkdocs
on:
push:
Expand All @@ -13,7 +13,7 @@ on:

jobs:
'build_latest_doc':
name: 'Update Public devel documentation'
name: 'Update Public main documentation'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -30,9 +30,9 @@ jobs:
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: 'Build mkdocs content and deploy to gh-pages to devel'
- name: 'Build mkdocs content and deploy to gh-pages to main'
run: |
pip install .[doc]
mike deploy --push devel
mike deploy --push main
# This may not always be required
mike set-default --push devel
mike set-default --push main
2 changes: 1 addition & 1 deletion anta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import importlib.metadata
import os

__version__ = importlib.metadata.version("anta")
__version__ = f"v{importlib.metadata.version('anta')}"
__credits__ = [
"Angélique Phillipps",
"Colin MacGiollaEáin",
Expand Down
2 changes: 1 addition & 1 deletion README.md → docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Commands:
nrfu Run NRFU against inventory devices
```
[![anta nrfu table output](imgs/anta-nrfu-table-output.png){ loading=lazy width="1600" }](imgs/anta-nrfu-table-output.png)
![anta nrfu table output](imgs/anta-nrfu-table-output.png)
## Documentation
Expand Down
1 change: 0 additions & 1 deletion docs/index.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/requirements-and-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ which anta

# Chck ANTA version
anta --version
anta, version 0.6.0
anta, version v0.6.0
```

## EOS Requirements
Expand Down
1 change: 0 additions & 1 deletion imgs

This file was deleted.

3 changes: 1 addition & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,14 @@ markdown_extensions:
baselevel: 3
- pymdownx.highlight
- pymdownx.superfences
- pymdownx.snippets
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true

# TOC
docs_dir: docs/
nav:
- Home: index.md
- Home: README.md
- Getting Started: getting-started.md
- Installation: requirements-and-installation.md
- Inventory & Tests catalog: usage-inventory-catalog.md
Expand Down
19 changes: 18 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ requires-python = ">=3.8"

[project.optional-dependencies]
dev = [
"bump2version==1.0.1",
"bumpver==2023.1125",
"black==23.3.0",
"flake8==6.0.0",
"isort==5.10.1",
Expand Down Expand Up @@ -100,6 +100,23 @@ anta = "anta.cli:cli"
include = ["anta*"]
namespaces = false

################################
# Version
################################
[tool.bumpver]
current_version = "0.6.0"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "bump: Version {old_version} -> {new_version}"
commit = true
# No tag
tag = false
push = false

[tool.bumpver.file_patterns]
"pyproject.toml" = ['current_version = "{version}"', 'version = "v{version}"']
"docs/contribution.md" = ["anta {version}"]
"docs/requirements-and-installation.md " = ["anta, version v{version}"]

################################
# Linting
################################
Expand Down

0 comments on commit 8209902

Please sign in to comment.