Skip to content

Commit

Permalink
Use bump-my-version to remove admonition in changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Jan 6, 2024
1 parent a3c14f0 commit f729750
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,24 +144,12 @@ jobs:
--replace "...v{current_version}"
./changelog.md
- name: Remove first warning message in changelog
shell: python
# Matches first occurrence of a multi-line block of text delimited by triple-backticks (```<anything>```).
run: |
import re
from pathlib import Path
file = Path("./changelog.md")
content = file.read_text()
cleaned_content = re.sub(
r"^\`\`\`.*?\`\`\`\n\n",
"",
content,
count=1,
flags=re.MULTILINE | re.DOTALL
)
file.write_text(cleaned_content)
run: >
bump-my-version replace --no-configured-files --ignore-missing-version
--regex --search "^\\\`\\\`\\\`.*?\\\`\\\`\\\`\\n\\n"
--replace ""
./changelog.md
- name: Setup Git
run: |
git config --global user.name "${{ github.actor }}"
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
This version is not released yet and is under active development.
```

- Use `bump-my-version` to remove admonition in changelog.

## [2.24.1 (2024-01-06)](https://github.com/kdeldycke/workflows/compare/v2.24.0...v2.24.1)

- Expose current and released version in metadata script.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# All versions are pinned so we have ultimate control over reproducibility.
autopep8 == 2.0.4
blacken-docs == 1.16.0
bump-my-version == 0.16.0
bump-my-version == 0.16.1
check-wheel-contents == 0.6.0
# https://mdformat.readthedocs.io/en/stable/users/plugins.html
mdformat == 0.7.17
Expand Down

0 comments on commit f729750

Please sign in to comment.