added the build command
This commit is contained in:
11
src/main.py
11
src/main.py
@@ -6,6 +6,7 @@ from publish import publish
|
||||
from remove import remove
|
||||
from list import list_cmd
|
||||
from uninstall import uninstall
|
||||
from build import build
|
||||
|
||||
|
||||
def parse_arguments():
|
||||
@@ -34,8 +35,14 @@ def parse_arguments():
|
||||
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
|
||||
# build command
|
||||
build_command = sub_parsers.add_parser(name="build", description="build a folder as a mineral and either install it or prepare it for publishing")
|
||||
build_command.add_argument("folder_path", help="path to the folder to build")
|
||||
build_command.add_argument("--gcc-args", nargs="*", help="any extra args you want to give to gcc")
|
||||
build_command.add_argument("--package", action="store_true", help="generate a folder with a mineral.ini and all the other files you need to publish the package")
|
||||
|
||||
|
||||
# parse arguments are run the command we chose
|
||||
args = arg_parser.parse_args()
|
||||
|
||||
if not args.command:
|
||||
@@ -52,6 +59,8 @@ def parse_arguments():
|
||||
list_cmd(args)
|
||||
elif args.command == "uninstall":
|
||||
uninstall(args)
|
||||
elif args.command == "build":
|
||||
build(args)
|
||||
|
||||
def main():
|
||||
parse_arguments()
|
||||
|
||||
Reference in New Issue
Block a user