Update build.js

This commit is contained in:
秋云
2025-04-28 21:33:15 +08:00
committed by GitHub
parent b603247eb4
commit 1d40349c25

View File

@@ -72,10 +72,10 @@ function extractInfoFromPathingFile(filePath, parentFolders) {
const contentObj = JSON.parse(content); const contentObj = JSON.parse(content);
// 提取版本字段,若不存在则使用 SHA1 前7位 // 提取版本字段,若不存在则使用创建时间
const version = contentObj.info && contentObj.info.version const version = contentObj.info && contentObj.info.version
? contentObj.info.version ? contentObj.info.version
: calculateSHA1(filePath).substring(0, 7); : : `${formatTime(stats.birthtime)}_${formatTime(stats.mtime)}`;
let tags = parentFolders.slice(2) let tags = parentFolders.slice(2)
.filter(tag => !tag.includes('@')) .filter(tag => !tag.includes('@'))