Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ Supported options:
- `--remove` to remove the CI configuration instead of adding it
- `--offline` to disable network access and rely on caches
- `--quiet` to suppress output
- `--frozen` to leave the virtual environment and lockfile unchanged (i.e. do not install dependencies, nor update lockfiles)

### `usethis badge`

Expand Down
8 changes: 6 additions & 2 deletions src/usethis/_interface/ci.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import typer

from usethis._options import offline_opt, quiet_opt
from usethis._options import frozen_opt, offline_opt, quiet_opt

app = typer.Typer(
help="Add config for Continuous Integration (CI) pipelines.", add_completion=False
Expand All @@ -14,14 +14,18 @@ def bitbucket(
),
offline: bool = offline_opt,
quiet: bool = quiet_opt,
frozen: bool = frozen_opt,
) -> None:
from usethis._config import usethis_config
from usethis._config_file import files_manager
from usethis._console import err_print
from usethis._core.ci import use_ci_bitbucket
from usethis.errors import UsethisError

with usethis_config.set(offline=offline, quiet=quiet), files_manager():
with (
usethis_config.set(offline=offline, quiet=quiet, frozen=frozen),
files_manager(),
):
try:
use_ci_bitbucket(remove=remove)
except UsethisError as err:
Expand Down
Loading