Skip to content

Commit

Permalink
Add debug info
Browse files Browse the repository at this point in the history
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
  • Loading branch information
llucax committed Oct 16, 2023
1 parent 748ad84 commit 2dbe60e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/frequenz/repo/config/cli/version/mike/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
from .... import version
from ....mkdocs import mike

_logger = logging.getLogger(__name__)


class GitHubActionsFormatter(logging.Formatter):
"""A formatter for GitHub Actions."""
Expand Down Expand Up @@ -60,6 +62,11 @@ def format(self, record: logging.LogRecord) -> str:

def _output_gha_vars(mike_version: mike.MikeVersionInfo) -> None:
"""Output mike version information as GitHub Action variables."""
_logger.debug("Outputting mike version information as GitHub Action variables:")
_logger.debug(" title: %r", mike_version.title)
_logger.debug(" version: %r", mike_version.version)
_logger.debug(" aliases: %r", " ".join(mike_version.aliases))

gha.set_output("title", mike_version.title)
gha.set_output("version", mike_version.version)
gha.set_output("aliases", " ".join(mike_version.aliases))
Expand Down Expand Up @@ -150,6 +157,7 @@ def _get_tags(repository: str) -> list[str]:
.splitlines()
)

_logger.debug("Got tags: %r", tags_str)
return tags_str


Expand Down Expand Up @@ -183,6 +191,7 @@ def _get_branches(repository: str) -> list[str]:
.decode("utf-8")
.splitlines()
)
_logger.debug("Got branches: %r", branches_str)
return branches_str


Expand Down

0 comments on commit 2dbe60e

Please sign in to comment.