mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 14:12:16 +03:00
Теперь при сборке сохраняем текущий профиль на контроллер для
будущего использования и понимания как была собрана прошивка
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
import configparser
|
||||
import os, json, sys, getopt
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
|
||||
|
||||
config = configparser.ConfigParser() # создаём объекта парсера INI
|
||||
@@ -202,6 +203,10 @@ config["platformio"]["default_envs"] = deviceName
|
||||
config["platformio"]["data_dir"] = profJson['projectProp']['platformio']['data_dir']
|
||||
with open("platformio.ini", 'w') as configFile:
|
||||
config.write(configFile)
|
||||
|
||||
# сохраняем применяемый профиль в папку data_svelte для загрузки на контроллер и дальнейшего переиспользования
|
||||
print(f"Сохраняем профиль {profile} в {dataDir}")
|
||||
shutil.copy(profile, dataDir + "/" + profile)
|
||||
|
||||
|
||||
# import ctypes # An included library with Python install.
|
||||
|
||||
Reference in New Issue
Block a user