Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add --no-publish/--no option to spk-convert-pip #1015

Merged
merged 2 commits into from
May 15, 2024
Merged
Changes from 1 commit
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
13 changes: 10 additions & 3 deletions packages/spk-convert-pip/spk-convert-pip
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,18 @@ def main() -> int:
default="origin",
help="The repository to publish to. Any configured spfs repository can be named here.",
)
pip_cmd.add_argument(
group = pip_cmd.add_mutually_exclusive_group()
group.add_argument(
"--publish",
default=None,
action="store_true",
help="Also publish the packages after convert",
help="Also publish the packages after conversion. Does not ask if you want to publish, assumes yes",
)
group.add_argument(
"--no-publish", "--no",
dcookspi marked this conversation as resolved.
Show resolved Hide resolved
default=None,
action="store_true",
help="Do not publish the packages after conversion. Does not ask if you want to publish, assumes no",
)
pip_cmd.add_argument(
"--force",
Expand Down Expand Up @@ -98,7 +105,7 @@ def main() -> int:
print(f" {spec.get('pkg')}")
print("")

if args.publish is None:
if args.publish is None and not args.no_publish:
print("These packages are now available in the local repository")
args.publish = bool(
input("Do you want to also publish these packages? [y/N]: ").lower()
Expand Down
Loading