liming 2 weeks ago
parent
commit
52f29535dd
2 changed files with 9 additions and 3 deletions
  1. 3 3
      src/updater/update.json
  2. 6 0
      updataSetVersion.js

+ 3 - 3
src/updater/update.json

@@ -1,7 +1,7 @@
 {
-  "version": "1.0.26",
-  "releaseDate": "2025-07-29 12:00:00",
-  "checksum": "2658f657ef5dfeabf6b4fbd97d1da6b80c3752284fd889c4fcc17718f66f1fbb",
+  "version": "1.0.31",
+  "releaseDate": "2025-07-30 02:39:08",
+  "checksum": "a6b3639814cc76c7ec3b8d5697e769d21b641975a265402c0815c38a27fb64a2",
   "minBinaryVersion": "1.0.0",
   "mandatory": true,
   "upDataDescription": "✨修正一些錯誤。。。。!!!"

+ 6 - 0
updataSetVersion.js

@@ -42,7 +42,13 @@ if (fs.existsSync("dist")) {
   const hash = crypto.createHash("sha256").update(zipData).digest("hex");
   console.log(`SHA-256: ${hash}`);
 
+  //  当前时间
+  const now = new Date();
+  const fmt = now.toISOString()
+               .replace('T', ' ')
+               .slice(0, 19);
   // 4. 修改 update.json 的 checksum
+  updata.releaseDate = fmt
   updata.checksum = hash; // 假设 update.json 有 checksum 字段
   fs.writeFileSync(updateJsonPath, JSON.stringify(updata, null, 2)); // 2 空格缩进
   fs.writeFileSync("src/updater/update.json", JSON.stringify(updata, null, 2)); // 2 空格缩进