2023-04-09 18:49:39 +08:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# 更新构建时间
|
|
|
|
import os
|
2023-09-29 13:41:48 +08:00
|
|
|
import sys
|
2023-04-09 18:49:39 +08:00
|
|
|
import json
|
|
|
|
import platform
|
|
|
|
import datetime
|
|
|
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
2023-09-29 13:41:48 +08:00
|
|
|
with open(sys.argv[1], "r") as file:
|
2023-04-09 18:49:39 +08:00
|
|
|
info = json.loads(file.read())
|
|
|
|
info["Time"] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " " + platform.platform()
|
2023-09-29 13:41:48 +08:00
|
|
|
with open(sys.argv[1], "w") as file:
|
2023-04-09 18:49:39 +08:00
|
|
|
file.write(json.dumps(info, ensure_ascii=False, indent=4))
|