mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修复 task 命令任务ID查询,系统依赖安装逻辑
This commit is contained in:
parent
b29a9e012c
commit
5354fc76db
|
@ -267,9 +267,9 @@ npm_install_1() {
|
|||
local dir_work=$1
|
||||
|
||||
cd $dir_work
|
||||
echo -e "运行 npm install...\n"
|
||||
echo -e "运行 pnpm install...\n"
|
||||
npm_install_sub
|
||||
[[ $? -ne 0 ]] && echo -e "\nnpm install 运行不成功,请进入 $dir_work 目录后手动运行 npm install...\n"
|
||||
[[ $? -ne 0 ]] && echo -e "\nnpm install 运行不成功,请进入 $dir_work 目录后手动运行 pnpm install...\n"
|
||||
cd $dir_current
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ npm_install_2() {
|
|||
local dir_work=$1
|
||||
|
||||
cd $dir_work
|
||||
echo -e "检测到 $dir_work 的依赖包有变化,运行 npm install...\n"
|
||||
echo -e "安装 $dir_work 依赖包...\n"
|
||||
npm_install_sub
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo -e "\n安装 $dir_work 的依赖包运行不成功,再次尝试一遍...\n"
|
||||
|
@ -303,6 +303,8 @@ update_depend() {
|
|||
npm_install_2 $dir_scripts
|
||||
fi
|
||||
|
||||
npm_install_2 $dir_root
|
||||
|
||||
cd $dir_current
|
||||
}
|
||||
|
||||
|
|
|
@ -39,9 +39,12 @@ handle_log_path() {
|
|||
fi
|
||||
|
||||
if [[ -z $ID ]]; then
|
||||
ID=$(cat $list_crontab_user | grep -E "$cmd_task $file_param" | perl -pe "s|.*ID=(.*) $cmd_task $file_param\.*|\1|" | head -1 | awk -F " " '{print $1}')
|
||||
ID=$(cat $list_crontab_user | grep -E "$cmd_task.* $filename" | perl -pe "s|.*ID=(.*) $cmd_task.* $filename\.*|\1|" | head -1 | awk -F " " '{print $1}')
|
||||
fi
|
||||
local suffix=""
|
||||
if [[ ! -z $ID ]]; then
|
||||
suffix="_${ID}"
|
||||
fi
|
||||
local suffix="_${ID}"
|
||||
|
||||
time=$(date "+$mtime_format")
|
||||
log_time=$(format_log_time "$mtime_format" "$time")
|
||||
|
|
|
@ -257,9 +257,6 @@ update_qinglong() {
|
|||
cp -f $file_config_sample $dir_config/config.sample.sh
|
||||
update_depend
|
||||
|
||||
[[ -f $dir_root/package.json ]] && ql_depend_new=$(cat $dir_root/package.json)
|
||||
[[ "$ql_depend_old" != "$ql_depend_new" ]] && npm_install_2 $dir_root
|
||||
|
||||
update_qinglong_static "$1" "$primary_branch"
|
||||
else
|
||||
echo -e "\n更新青龙源文件失败,请检查网络...\n"
|
||||
|
|
Loading…
Reference in New Issue
Block a user