mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
Принудительно BuildTime
This commit is contained in:
@@ -7,6 +7,9 @@ lib_deps_external =
|
||||
bblanchon/ArduinoJson @6.18.0
|
||||
knolleary/PubSubClient
|
||||
|
||||
[env]
|
||||
extra_scripts = pre:prebuildscript.py
|
||||
|
||||
[env:esp8266_1mb_ota]
|
||||
lib_deps =
|
||||
${common_env_data.lib_deps_external}
|
||||
|
||||
13
prebuildscript.py
Normal file
13
prebuildscript.py
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
import os
|
||||
import configparser
|
||||
|
||||
config = configparser.ConfigParser() # создаём объекта парсера INI
|
||||
config.read("platformio.ini")
|
||||
deviceName = config["platformio"]["default_envs"]
|
||||
# удаляем объектный файл где используется время сборки, для обновления
|
||||
try:
|
||||
os.remove("./.pio/build/"+deviceName+"/src/Main.cpp.o")
|
||||
except OSError as e:
|
||||
# If it fails, inform the user.
|
||||
print("Error: %s - %s." % (e.filename, e.strerror))
|
||||
Reference in New Issue
Block a user