Skip to content

Commit

Permalink
Updated workflow #6
Browse files Browse the repository at this point in the history
  • Loading branch information
StrahinjaJacimovic committed Oct 7, 2024
1 parent 3a88784 commit 97e7f7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/release_mcus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
7 changes: 3 additions & 4 deletions scripts/update_db_for_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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'
)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 97e7f7a

Please sign in to comment.