|
|
@@ -9,6 +9,8 @@ import subprocess
|
|
|
import sys
|
|
|
import json
|
|
|
|
|
|
+BIG_VER = "V0004"
|
|
|
+
|
|
|
#------------------------------------------------------------------
|
|
|
# 读取配置信息
|
|
|
import configparser
|
|
|
@@ -175,7 +177,7 @@ TOOLS_PATH = tools\\
|
|
|
MAIN_LUA_DEBUG = false
|
|
|
LUA_DEBUG = false
|
|
|
COM_PORT = COM56
|
|
|
-'''.replace("${EC}", "Air302_V0003_"+_tag+".ec"))
|
|
|
+'''.replace("${EC}", "Air302_"+BIG_VER+"_"+_tag+".ec"))
|
|
|
|
|
|
if os.path.exists("userdoc") :
|
|
|
shutil.copytree("userdoc", "tmp/userdoc")
|
|
|
@@ -187,7 +189,7 @@ COM_PORT = COM56
|
|
|
with open("tmp/文档在userdoc目录.txt", "w") as f:
|
|
|
f.write("QQ群: 1061642968")
|
|
|
|
|
|
- with zipfile.ZipFile("tmp/Air302_V0003_"+_tag+".ec", mode="w", compression=zipfile.ZIP_DEFLATED, compresslevel=9) as zip :
|
|
|
+ with zipfile.ZipFile("tmp/Air302_"+BIG_VER+"_"+_tag+".ec", mode="w", compression=zipfile.ZIP_DEFLATED, compresslevel=9) as zip :
|
|
|
zip.write("tmp/ec/luatos.bin", "luatos.bin") # 底层固件
|
|
|
zip.write("tmp/ec/comdb.txt", "comdb.txt") # uart0输出的unilog所需要的数据库文件,备用
|
|
|
zip.write("tmp/ec/bootloader.bin", "bootloader.bin") # bootloader,备用
|
|
|
@@ -198,11 +200,11 @@ COM_PORT = COM56
|
|
|
if os.path.exists(FTC_PATH):
|
|
|
shutil.copytree(FTC_PATH, "tmp/FlashToolCLI")
|
|
|
|
|
|
- pkg_name = "Air302_V0003_"+_tag + ".zip"
|
|
|
- shutil.make_archive("Air302_V0003_"+_tag, 'zip', "tmp")
|
|
|
+ pkg_name = "Air302_"+BIG_VER+"_"+_tag + ".zip"
|
|
|
+ shutil.make_archive("Air302_"+BIG_VER+"_"+_tag, 'zip', "tmp")
|
|
|
|
|
|
## 拷贝一份固定路径的
|
|
|
- shutil.copy("tmp/Air302_V0003_"+_tag+".ec", "tmp/Air302_dev.ec")
|
|
|
+ shutil.copy("tmp/Air302_"+BIG_VER+"_"+_tag+".ec", "tmp/Air302_dev.ec")
|
|
|
|
|
|
print("ALL DONE===================================================")
|
|
|
print("Package Name", pkg_name)
|
|
|
@@ -311,8 +313,8 @@ def _lfs(_path=None):
|
|
|
with open(_path, "rb") as f2 :
|
|
|
shutil.copyfileobj(f2, f, _size)
|
|
|
if TAG_PROJECT != "" and TAG_VERSION != "":
|
|
|
- # otademo_1.2.7_LuatOS_V0003_ec616
|
|
|
- TAG_NAME = "%s_%s_LuatOS_V0003_ec616.bin" % (TAG_PROJECT, TAG_VERSION)
|
|
|
+ # otademo_1.2.7_LuatOS_"+BIG_VER+"_ec616
|
|
|
+ TAG_NAME = "%s_%s_LuatOS_"+BIG_VER+"_ec616.bin" % (TAG_PROJECT, TAG_VERSION)
|
|
|
print("P4. OTA Update bin --> " + TAG_NAME)
|
|
|
shutil.copy(FTC_PATH + "disk/flashx.bin", TAG_NAME)
|
|
|
|