Skip to content

Commit

Permalink
fix: prevent generated changelog from style guide violation
Browse files Browse the repository at this point in the history
Apply pre-commit hooks (i.e. prettier) to the generated changelog before committing it to the codebase.
  • Loading branch information
proofit404 committed Feb 11, 2020
1 parent f595925 commit 7d4047d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Expand Up @@ -91,6 +91,8 @@ jobs:
inputs:
versionSpec: "3.8"
displayName: Install Python.
- script: pip install --upgrade tox
displayName: Install Tox.
- script: |
curl -sSL "https://raw.githubusercontent.com\
/python-poetry/poetry/master/get-poetry.py" | python
Expand Down
3 changes: 2 additions & 1 deletion release.config.js
Expand Up @@ -13,7 +13,8 @@ module.exports = {
[
"@semantic-release/exec",
{
prepareCmd: "poetry version ${nextRelease.version} && poetry build",
prepareCmd:
"tox -e precommit -- --files docs/changelog.md ; poetry version ${nextRelease.version} && poetry build",
publishCmd: "poetry publish"
}
],
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Expand Up @@ -21,7 +21,7 @@ deps =
commands_pre =
commands =
pre-commit autoupdate
pre-commit run --all-files
pre-commit run {posargs:--all-files}
commands_post = sed -i 's/rev: .*$/rev: ""/g' .pre-commit-config.yaml
whitelist_externals = sed

Expand Down

0 comments on commit 7d4047d

Please sign in to comment.