From 14c52b53a49f9409c4b915fde02b4e3db0f3bf04 Mon Sep 17 00:00:00 2001 From: augushong Date: Thu, 2 Nov 2023 17:19:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/admin/service/AdminUpdateServiceBase.php | 14 +++++++++++--- extend/base/common/command/admin/VersionBase.php | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/extend/base/admin/service/AdminUpdateServiceBase.php b/extend/base/admin/service/AdminUpdateServiceBase.php index 7542c1f..435dd42 100644 --- a/extend/base/admin/service/AdminUpdateServiceBase.php +++ b/extend/base/admin/service/AdminUpdateServiceBase.php @@ -202,6 +202,11 @@ class AdminUpdateServiceBase $need_process_files = []; foreach ($changed_files as $file_path => $type) { + if ($type == 'add') { + $need_process_files[$file_path] = $type; + continue; + } + $now_file_path = $now_dir . '/' . $file_path; $current_file_path = $current_version_dir . '/' . $file_path; $last_file_path = $last_version_dir . '/' . $file_path; @@ -211,18 +216,21 @@ class AdminUpdateServiceBase continue; } + if (PathTools::compareFiles($now_file_path, $current_file_path)) { + // 如果当前代码 和 当前版本 一致 + $need_process_files[$file_path] = $type; + continue; + } + if (in_array($file_path, $list_optional_update_files)) { // 可选更新的文件发生了变化,提示用户手动维护上游信息 $optional_update_waring_files[$file_path] = $type; - } else { // 强制更新的文件被定制了,需要提醒可能会产生错误 $force_update_waring_files[$file_path] = $type; - } } - if (!empty($optional_update_waring_files)) { foreach ($optional_update_waring_files as $file_path => $type) { $output->writeln($file_path . ' ' . $type); diff --git a/extend/base/common/command/admin/VersionBase.php b/extend/base/common/command/admin/VersionBase.php index 65828ef..e1e7db3 100644 --- a/extend/base/common/command/admin/VersionBase.php +++ b/extend/base/common/command/admin/VersionBase.php @@ -12,7 +12,7 @@ use think\console\Output; class VersionBase extends Command { - public const VERSION = 'v2.0.61'; + public const VERSION = 'v2.0.62'; public const LAYUI_VERSION = '2.8.17';