mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 05:36:39 +00:00
Merge pull request #6945 from Jason2866/patch-3
Change function rename firmware script to name firmware
This commit is contained in:
commit
0962562cfc
@ -1,12 +1,12 @@
|
|||||||
Import('env')
|
Import('env')
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
def obj_ren_after_bin(source, target, env):
|
def name_firmware(source, target, env):
|
||||||
# print("Rename firmware.bin")
|
|
||||||
base_dir = os.path.dirname(str(target[0]))
|
base_dir = os.path.dirname(str(target[0]))
|
||||||
new_file = "{}{}{}.bin".format(base_dir, os.path.sep, str(target[0]).split(os.path.sep)[1])
|
new_file = "{}{}{}.bin".format(base_dir, os.path.sep, str(target[0]).split(os.path.sep)[1])
|
||||||
if os.path.isfile(new_file):
|
if os.path.isfile(new_file):
|
||||||
os.remove(new_file)
|
os.remove(new_file)
|
||||||
os.rename(str(target[0]), new_file)
|
shutil.copyfile(str(target[0]), new_file)
|
||||||
|
|
||||||
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [obj_ren_after_bin])
|
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [name_firmware])
|
@ -86,7 +86,7 @@ upload_resetmethod = nodemcu
|
|||||||
; *** Upload Serial reset method for Wemos and NodeMCU
|
; *** Upload Serial reset method for Wemos and NodeMCU
|
||||||
upload_port = COM5
|
upload_port = COM5
|
||||||
extra_scripts = pio/strip-floats.py
|
extra_scripts = pio/strip-floats.py
|
||||||
; pio/rename-firmware.py
|
; pio/name-firmware.py
|
||||||
; pio/obj-dump.py
|
; pio/obj-dump.py
|
||||||
|
|
||||||
; *** Upload file to OTA server using SCP
|
; *** Upload file to OTA server using SCP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user