Skip to content

Commit

Permalink
➕ invoke~=2.0, types-invoke~=2.0
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed Aug 15, 2024
1 parent e0550e2 commit 6512849
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
14 changes: 12 additions & 2 deletions ozi/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

import sys
from pathlib import Path
from typing import TYPE_CHECKING

from invoke.context import Context
from invoke.tasks import call
from invoke.tasks import task

if TYPE_CHECKING:
from invoke.context import Context


@task
def sign_log(c: Context, suite: str | None = None) -> None:
Expand All @@ -22,7 +25,13 @@ def sign_log(c: Context, suite: str | None = None) -> None:
print(f'Log not found for {suite}.', file=sys.stderr)


@task(pre=[call(sign_log, suite='dist'), call(sign_log, suite='test'), call(sign_log, suite='lint')]) # pyright: ignore
@task(
pre=[
call(sign_log, suite='dist'), # pyright: ignore
call(sign_log, suite='test'), # pyright: ignore
call(sign_log, suite='lint'), # pyright: ignore
],
)
def release(c: Context, sdist: bool = False) -> None:
"""Create release wheels for the current interpreter.

Expand All @@ -47,6 +56,7 @@ def release(c: Context, sdist: bool = False) -> None:
def provenance(c: Context) -> None:
print('SLSA provenance currently unavailable in OZI self-hosted CI/CD', file=sys.stderr)


@task(provenance)
def publish(c: Context) -> None:
"""Publishes a release tag"""
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ commands =
no_package = true
deps =
-r requirements.in
invoke
commands_pre =
pipx install --python=python meson
meson setup {env_tmp_dir} -Ddist=enabled -Dtox-env-dir={env_dir}
Expand Down
2 changes: 2 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
TAP-Producer~=0.1.3
invoke~=2.0
meson[ninja]>=1.1.0
ozi-core~=0.1.9
ozi-spec~=0.5.5
ozi-templates~=2.5.4
pip-tools
setuptools_scm[toml]
tomli>=2.0.0;python_version<"3.11"
types-invoke~=2.0

0 comments on commit 6512849

Please sign in to comment.