Print version if --version flag is used

This commit is contained in:
Senko Rasic
2024-02-16 16:25:05 -08:00
parent 1c01bc021c
commit d616b9dd75
2 changed files with 6 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ from utils.exit import exit_gpt_pilot
from logger.logger import logger
from database.database import database_exists, create_database, tables_exist, create_tables, get_created_apps_with_steps
from utils.settings import settings, loader
from utils.settings import settings, loader, get_version
from utils.telemetry import telemetry
from helpers.exceptions import ApiError, TokenLimitError, GracefulExit
@@ -71,6 +71,10 @@ if __name__ == "__main__":
f"{'' if len(app['development_steps']) == 0 else app['development_steps'][-1]['id']:3}"
f" {app['name']}" for app in get_created_apps_with_steps()))
elif '--version' in args:
print(get_version())
run_exit_fn = False
elif '--ux-test' in args:
from test.ux_tests import run_test
run_test(args['--ux-test'], args)

View File

@@ -64,7 +64,7 @@ def get_arguments():
print(color_green_bold(f'{app.name} (app_id={arguments["app_id"]})'))
print(color_green_bold('--------------------------------------------------------------\n'))
elif '--get-created-apps-with-steps' not in args:
elif '--get-created-apps-with-steps' not in args and '--version' not in args:
arguments['app_id'] = str(uuid.uuid4())
print(color_green_bold('\n------------------ STARTING NEW PROJECT ----------------------'))
print("If you wish to continue with this project in future run:")