From 97e7f7af33ac4fb6479fcb84a437b82a8ef5fb57 Mon Sep 17 00:00:00 2001 From: strahi-linux Date: Mon, 7 Oct 2024 09:39:04 +0200 Subject: [PATCH] Updated workflow #6 --- scripts/release_mcus.py | 2 +- scripts/update_db_for_release.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/release_mcus.py b/scripts/release_mcus.py index d7eeb9989..a275a423f 100644 --- a/scripts/release_mcus.py +++ b/scripts/release_mcus.py @@ -146,7 +146,7 @@ def extract_mcu_names(file_name, source_dir, output_dir, regex): if regex_pattern.match(mcu_name): mcus[file_name]['mcu_names'].add(mcu_name) if 'gcc_clang' in source_dir or 'XC32' in source_dir: - isPresent, readData = read_data_from_db('necto_db.db', f'SELECT sdk_config FROM Devices WHERE name IS "{mcu_name}"') + isPresent, readData = read_data_from_db('necto_db_dev.db', f'SELECT sdk_config FROM Devices WHERE name IS "{mcu_name}"') if isPresent: configJson = json.loads(readData[0][0]) mcus[file_name]['cores'].add(configJson['CORE_NAME']) diff --git a/scripts/update_db_for_release.py b/scripts/update_db_for_release.py index e992907d1..ed2274e7b 100644 --- a/scripts/update_db_for_release.py +++ b/scripts/update_db_for_release.py @@ -593,8 +593,7 @@ def updateDevicesFromCore(dbs, queries): values.append(filtered_versions) # Add Packages if they are not present in the database elif 'DeviceToPackage' == eachTableKey: - package_uids = [] - package_uids.extend(table_keys['DeviceToPackage']['package_uid']) + package_uids = linkerTables['tables'][enums.dbSync.BOARDTODEVICEPACKAGES.value]['DeviceToPackage']['package_uid'] for package_uid in package_uids: pin_count = package_uid.split('/')[0] package_name = package_uid.split('/')[1] @@ -606,7 +605,7 @@ def updateDevicesFromCore(dbs, queries): package_uid, package_uid, "", - f'{"_MSDK_PACKAGE_NAME_":"{package_name}","_MSDK_DIP_SOCKET_TYPE_":""}' + '{"_MSDK_PACKAGE_NAME_":"' + package_name + '","_MSDK_DIP_SOCKET_TYPE_":""}' ], 'pin_count,name,uid,stm_sdk_config,sdk_config' ) @@ -752,7 +751,7 @@ async def main(token, repo, doc_codegrip, doc_mikroprog, release_version="", rel ## EOF Step 2 ## Step 3 - Update database with Core settings - coreQueriesPath = os.path.join(os.path.dirname(__file__), '../queries') + coreQueriesPath = os.path.join(os.getcwd(), 'resources/queries') if os.path.exists(os.path.join(coreQueriesPath, 'mcus')): updateDevicesFromCore([databaseErp, databaseNecto], os.path.join(coreQueriesPath, 'mcus')) ## If any new mcus were added ## EOF Step 3