Skip to content

Commit

Permalink
Don't fail if the mike version can't be determined
Browse files Browse the repository at this point in the history
If the `mike` version can't be determined, just emit a warning and exit
succesfully. This is useful for the CI, where the `mike` version can't
be determined because the branch name doesn't follow the guidelines (for
example in PRs).

The CI will now emit a warning and skip the publishing of the
documentation website.

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
  • Loading branch information
llucax committed Nov 6, 2023
1 parent 50980d6 commit b9e2d84
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,11 @@ index 9a1604b..b183524 100644
```

If that's not the case, your `pyproject.toml` and/or `mkdocs.yml` files might have been diverged from the generated files and updated in a way that is not compatible with the upgrade. In that case you'll have to fix it manually or re-generate the templates.

## Bug Fixes

- `cli.version.mike.info`: Don't fail if the version can't be determined, just emit a warning and exit succesfully.

### Cookiecutter template

- CI: The documentation publishing job will not fail if the version for `mike` can't be determined, it will just emit a warning and skip the publishing of the documentation website.
5 changes: 4 additions & 1 deletion src/frequenz/repo/config/cli/version/mike/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def main() -> None:
try:
mike_version = mike.build_mike_version(github.get_repo_version_info())
except ValueError as error:
github.abort(f"{error}.", title="Documentation was not published")
gha.warning(
f"{error}.", title="Could not determine the version information for `mike`"
)
return

_output_gha_vars(mike_version)

Expand Down

0 comments on commit b9e2d84

Please sign in to comment.