added publish and remove commands
This commit is contained in:
15
src/main.py
15
src/main.py
@@ -2,6 +2,8 @@ import argparse
|
||||
import os, sys
|
||||
|
||||
from install import install
|
||||
from publish import publish
|
||||
from remove import remove
|
||||
|
||||
|
||||
def parse_arguments():
|
||||
@@ -22,6 +24,15 @@ def parse_arguments():
|
||||
list_command = sub_parsers.add_parser(name="list", description="list all minerals installed in the current environment")
|
||||
list_command.add_argument("--env_name", help="list all minerals from a specific environment.", default=None, required=False)
|
||||
|
||||
# publish command
|
||||
publish_command = sub_parsers.add_parser(name="publish", description="publish a package to the repository")
|
||||
publish_command.add_argument("name", help="name and version of the package")
|
||||
publish_command.add_argument("folder_path", help="path to the folder that will be uploaded")
|
||||
|
||||
# remove command
|
||||
remove_command = sub_parsers.add_parser(name="remove", description="remove a published package from the repository")
|
||||
remove_command.add_argument("name", help="name and version of the package")
|
||||
|
||||
# env command
|
||||
"""env_command = sub_parsers.add_parser(name="env", description="manage Ground environments")
|
||||
env_sub_parsers = env_command.add_subparsers(dest="env_command")
|
||||
@@ -48,6 +59,10 @@ def parse_arguments():
|
||||
|
||||
if args.command == "install":
|
||||
install(args)
|
||||
elif args.command == "publish":
|
||||
publish(args)
|
||||
elif args.command == "remove":
|
||||
remove(args)
|
||||
|
||||
def main():
|
||||
parse_arguments()
|
||||
|
||||
Reference in New Issue
Block a user