Skip to content

Commit

Permalink
优化更新日志生成
Browse files Browse the repository at this point in the history
  • Loading branch information
chenmozhijin committed Sep 28, 2024
1 parent 2508798 commit 500f404
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build_helper/releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ def releases(cfg: dict) -> None:

for pkg, version in current_packages.items():
if pkg in old_packages:
if old_packages[pkg] != version:
if old_packages[pkg] != version and not pkg.startswith("luci-i18n-"):
changelog += f"更新: {pkg} {old_packages[pkg]} -> {version}\n"
else:
changelog += f"新增: {pkg} {version}\n"
for pkg, version in old_packages.items():
if pkg not in current_packages:
changelog += f"移除: {pkg} {version}\n"

changelog = "更新日志:\n" + changelog if changelog else "无任何软件包更新"
changelog = "更新日志:\n" + changelog if changelog else "无任何软件包更新"

body = f"编译完成于: {datetime.now(timezone(timedelta(hours=8))).strftime('%Y-%m-%d %H:%M:%S')}\n"
body += f"使用的配置: {cfg['name']}\n"
Expand Down

0 comments on commit 500f404

Please sign in to comment.