Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
fix: release script continued
Browse files Browse the repository at this point in the history
Signed-off-by: Mateusz Urbanek <mateusz.urbanek.98@gmail.com>
  • Loading branch information
shanduur committed Jun 3, 2024
1 parent 85cc473 commit 55a6c7a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions hack/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,12 @@ def mike(args: list[str]) -> None:
Raises:
Exception: If Mike command execution returns a non-zero exit code.
"""
rc = subprocess.run(
subprocess.run(
["mike"] + args,
stdout=sys.stdout,
stderr=sys.stderr,
check=True,
)
if rc.returncode != 0:
raise Exception(rc.stderr)


def is_initial() -> bool:
Expand All @@ -76,11 +75,21 @@ def is_initial() -> bool:
Returns:
bool: True if the repository state is initial, False otherwise.
"""
subprocess.run(["git", "fetch", "origin", "gh-pages"])
logger.info("fetching gh-pages from origin")
subprocess.run(
["git", "fetch", "origin", "gh-pages"],
stdout=sys.stdout,
stderr=sys.stderr,
)

logger.info("getting ref of gh-pages")
rc = subprocess.run(
["git", "show-ref", "--quiet", "refs/heads/gh-pages"],
stdout=sys.stdout,
stderr=sys.stderr,
)

logger.info(f"returncode={rc.returncode}")
return rc.returncode != 0


Expand Down

0 comments on commit 55a6c7a

Please sign in to comment.