Skip to content

Commit

Permalink
minor fixes. not sure how to test this but in production
Browse files Browse the repository at this point in the history
  • Loading branch information
glyph committed Aug 12, 2024
1 parent 2c579c2 commit 7cdc981
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from subprocess import CalledProcessError, run
from sys import exit, stderr
from tempfile import mkdtemp
from typing import Any, Dict, NoReturn, Optional, Sequence, cast
from typing import Any, Dict, NoReturn, Optional, Sequence

from click import group as commandGroup
from click import option as commandOption
Expand Down Expand Up @@ -110,7 +110,7 @@ def releaseTagName(version: Version) -> str:
"""
Compute the name of the release tag for the given version.
"""
return cast(str, version.public())
return version.public()


def createReleaseBranch(repository: Repository, version: Version) -> Head:
Expand Down Expand Up @@ -287,22 +287,32 @@ def publishRelease(final: bool, test: bool = False) -> None:

print("Pushing tag to origin:", tag)
repository.remotes.origin.push(refspec=tag.path)
print("Pushing branch to origin:", branch)
repository.remotes.origin.push()

distribute(repository, tag, test=test)


@commandGroup()
def main() -> None:
pass
"""
Software release tool for Klein.
"""


@main.command()
def start() -> None:
"""
Begin a new release process.
"""
startRelease()


@main.command()
def bump() -> None:
"""
Increase the version number for an in-progress release candidate.
"""
bumpRelease()


Expand All @@ -318,6 +328,9 @@ def bump() -> None:
default=False,
)
def publish(final: bool, test: bool) -> None:
"""
Publish the current version of the software to PyPI.
"""
publishRelease(final=final, test=test)


Expand Down

0 comments on commit 7cdc981

Please sign in to comment.