mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-10 13:37:55 -05:00
Print version if --version flag is used
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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:")
|
||||
|
||||
Reference in New Issue
Block a user