发布新版本;增加自动替换脚本

This commit is contained in:
2023-12-08 14:09:13 +08:00
parent 89c0961cbc
commit 9f2d0898ec
9 changed files with 232 additions and 2 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace base\admin\service;
use think\console\Input;
use think\console\Output;
use UpdateFunction;
class AdminUpdateCodeServiceBase
{
/**
* @var Input
*/
public $input;
/**
* @var Output
*/
public $output;
public function update($version)
{
$class_function_path = app_file_path('admin/service/adminUpdateCodeData/' . $version . '.php');
if (!file_exists($class_function_path)) {
$this->output->error('指定版本无需特定更新');
return;
}
require_once $class_function_path;
$update_class = new UpdateFunction();
$update_class->input = $this->input;
$update_class->output = $this->output;
$update_class->update();
}
}