Skip to content

Commit

Permalink
🐛: fix tasks.py for use in CI
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <ozi.project@outlook.com>
  • Loading branch information
rjdbcm committed Sep 8, 2024
1 parent cbb437d commit 10b6732
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions ozi/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,7 @@ def checkpoint(c: Context, suite: str, maxfail: int = 1, ozi: bool = False) -> N
)


@task(
pre=[
call(sign_checkpoint, suite='dist'), # type: ignore
call(sign_checkpoint, suite='test'), # type: ignore
call(sign_checkpoint, suite='lint'), # type: ignore
],
)
@task
def release(
c: Context,
sdist: bool = False,
Expand All @@ -104,7 +98,7 @@ def release(
return print('No release drafted.', file=sys.stderr)
if sdist:
c.run('python -m build --sdist')
c.run('sigstore sign dist/*.tar.gz')
c.run('sigstore sign --output-dir=sig dist/*.tar.gz')
ext_wheel = (
c.run('cibuildwheel --prerelease-pythons --output-dir dist .')
if cibuildwheel
Expand All @@ -115,14 +109,14 @@ def release(
c.run('sigstore sign --output-dir=sig dist/*.whl')


@task(release)
@task
def provenance(c: Context) -> None:
"""SLSA provenance currently unavailable in OZI self-hosted CI/CD"""
print(inspect.getdoc(provenance), file=sys.stderr)


@task(provenance)
def publish(c: Context, upload: bool = True) -> None:
@task
def publish(c: Context) -> None:
"""Publishes a release tag"""
c.run('psr publish')
c.run('twine check dist/*')
Expand Down

0 comments on commit 10b6732

Please sign in to comment.