From 34e72719a5c50012371c4e13c48259faf58d1719 Mon Sep 17 00:00:00 2001 From: Alex Terrell Date: Wed, 28 Feb 2024 12:38:49 -0700 Subject: [PATCH 1/2] Update make.py Do not load sdk_settings.ini for create action. --- make.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/make.py b/make.py index 6036a81..1967191 100755 --- a/make.py +++ b/make.py @@ -170,6 +170,7 @@ def scan_for_cr(path): # Package the app files into a tar.gz archive. def package(): + global g_app_name print("Packaging {}".format(g_app_name)) success = True package_dir = os.path.join('tools', 'bin') @@ -361,7 +362,7 @@ def output_help(): # Get the uuid from application package.ini if not already set -def get_app_uuid(ceate_new_uuid=False): +def get_app_uuid(): global g_app_uuid if g_app_uuid == '': @@ -373,7 +374,7 @@ def get_app_uuid(ceate_new_uuid=False): if uuid_key in config[g_app_name]: g_app_uuid = config[g_app_name][uuid_key] - if ceate_new_uuid or g_app_uuid == '': + if g_app_uuid == '': # Create a UUID if it does not exist _uuid = str(uuid.uuid4()) config.set(g_app_name, uuid_key, _uuid) @@ -389,7 +390,7 @@ def get_app_uuid(ceate_new_uuid=False): # Setup all the globals based on the OS and the sdk_settings.ini file. -def init(ceate_new_uuid): +def init(): global g_python_cmd global g_app_name global g_dev_client_ip @@ -425,6 +426,9 @@ def init(ceate_new_uuid): success = False print('ERROR 1: The {} key does not exist in {}'.format(app_key, settings_file)) + if g_app_name == '': + print('The app_name key is empty in {}'.format(settings_file)) + if ip_key in config[sdk_key]: g_dev_client_ip = config[sdk_key][ip_key] else: @@ -447,7 +451,7 @@ def init(ceate_new_uuid): print('ERROR 5: The {} section does not exist in {}'.format(sdk_key, settings_file)) # This will also create a UUID if needed. - get_app_uuid(ceate_new_uuid) + get_app_uuid() return success @@ -463,8 +467,10 @@ def init(ceate_new_uuid): if len(sys.argv) > 2: option = str(sys.argv[2]).lower() - if not init(ceate_new_uuid=utility_name == 'uuid'): - sys.exit(0) + if utility_name in ['clean', 'package', 'build', 'uuid', 'status', 'install', 'start', 'stop', 'uninstall', 'purge']: + # Load the settings from the sdk_settings.ini file. + if not init(): + sys.exit(0) if utility_name == 'clean': if option == 'all': From 5da398748695d47ec5080389d621afb228214a78 Mon Sep 17 00:00:00 2001 From: Alex Terrell Date: Wed, 28 Feb 2024 12:39:39 -0700 Subject: [PATCH 2/2] Update make.py --- make.py | 1 - 1 file changed, 1 deletion(-) diff --git a/make.py b/make.py index 1967191..878fe15 100755 --- a/make.py +++ b/make.py @@ -170,7 +170,6 @@ def scan_for_cr(path): # Package the app files into a tar.gz archive. def package(): - global g_app_name print("Packaging {}".format(g_app_name)) success = True package_dir = os.path.join('tools', 'bin')