Compare commits
2 Commits
655b1e6f58
...
b4e15c6cae
Author | SHA1 | Date |
---|---|---|
Siwat Sirichai | b4e15c6cae | |
Siwat Sirichai | 0a93b41845 |
|
@ -89,6 +89,10 @@ for environment in environments:
|
||||||
else:
|
else:
|
||||||
config[f'env:{environment}']['build_flags'] = config[f'env:{environment}']['build_flags'] + f' -DFW_VERSION=\\"{git_branch}_{environment}_{commit_hash}\\"'
|
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 argument is not supplied, build all environments listed in platformio.ini
|
||||||
if len(sys.argv) == 1:
|
if len(sys.argv) == 1:
|
||||||
subprocess.run([f'{platformio_path}', 'run','-c',f'{firmware_folder}/platformio.ini'], cwd=current_dir)
|
subprocess.run([f'{platformio_path}', 'run','-c',f'{firmware_folder}/platformio.ini'], cwd=current_dir)
|
||||||
|
|
Loading…
Reference in New Issue