适配 meta 内核的两行版本信息

This commit is contained in:
RikusouPatrickstar 2023-04-14 21:15:15 +08:00
parent f24e796dcc
commit d6eb83ac30
4 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ jobs:
./tmp/*
- name: Commit and push version
run: |
sed -i "s/meta.a_v=.*/meta.a_v=${download_version}/" bin/version
sed -i "s/meta.a_v=.*/meta.a_v=$(./tmp/clash-linux-amd64 -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')/" bin/version
rm -fr ./tmp
git config --global user.email "juewuy@126.com" && git config --global user.name "Bot"
git add . && git commit -m "更新Meta.Alpha内核至${download_version}" || exit 0

View File

@ -50,7 +50,7 @@ jobs:
rm -fr ./bin/clash.meta/*
cp ./tmp/* ./bin/clash.meta/
rm -fr ./tmp
sed -i "s/meta_v=.*/meta_v=$(./bin/clash.meta/clash-linux-amd64 -v 2>/dev/null | sed 's/ linux.*//;s/.* //')/" bin/version
sed -i "s/meta_v=.*/meta_v=$(./bin/clash.meta/clash-linux-amd64 -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')/" bin/version
- name: Commit and push
run: |
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"

View File

@ -843,7 +843,7 @@ update(){
[ "$clashcore" = "clashpre" ] && clash_n=$clashpre_v
[ "$clashcore" = "clash.net" ] && clash_n=$clashnet_v
[ "$clashcore" = "clash.meta" ] && clash_n=$meta_v
clash_v=$($bindir/clash -v 2>/dev/null | sed 's/ linux.*//;s/.* //')
clash_v=$($bindir/clash -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
[ -z "$clash_v" ] && clash_v=$clashv
echo -e "\033[30;47m欢迎使用更新功能\033[0m"
echo -----------------------------------------------

View File

@ -1119,7 +1119,7 @@ bfstart(){
$0 webget $bindir/clash "$update_url/bin/$clashcore/clash-linux-$cpucore"
#校验内核
chmod +x $bindir/clash 2>/dev/null
clashv=$($bindir/clash -v 2>/dev/null | sed 's/ linux.*//;s/.* //')
clashv=$($bindir/clash -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
if [ -z "$clashv" ];then
rm -rf $bindir/clash
logger "核心下载失败,请重新运行或更换安装源!" 31