Compare commits

...

2 Commits

Author SHA1 Message Date
Siwat Sirichai 18e4153b06 Merge branch 'main' into cud 2023-12-11 11:33:22 +07:00
Siwat Sirichai 0a93b41845 add version number 2023-12-11 11:31:52 +07:00
1 changed files with 4 additions and 0 deletions

View File

@ -89,6 +89,10 @@ for environment in environments:
else:
config[f'env:{environment}']['build_flags'] = config[f'env:{environment}']['build_flags'] + f' -DFW_VERSION=\\"{git_branch}_{environment}_{commit_hash}\\"'
# Write the platformio.ini file
with open(os.path.join(firmware_folder, 'platformio.ini'), 'w') as configfile:
config.write(configfile)
# if argument is not supplied, build all environments listed in platformio.ini
if len(sys.argv) == 1:
subprocess.run([f'{platformio_path}', 'run','-c',f'{firmware_folder}/platformio.ini'], cwd=current_dir)