hi-server/scripts/version-history.sh
shanshanzhong 9638cc11fa
Some checks failed
Build docker and publish / build (20.15.1) (push) Failing after 7m38s
feat: 单订阅模式下赠送订阅自动合并,保持token不变
- purchaseLogic: 允许只有赠送订阅(order_id=0)的用户在SingleModel下新购
- activateOrderLogic: NewPurchase激活时检测赠送订阅,在原有订阅上延长到期时间而非创建新记录
2026-02-24 21:01:36 -08:00

42 lines
1.2 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 版本历史查询工具
# 用法: ./scripts/version-history.sh [数量]
set -e
COUNT=${1:-20}
BRANCH=${2:-dev}
echo "========================================"
echo "📦 PPanel Server 版本历史"
echo "========================================"
echo ""
echo "🔹 分支: $BRANCH"
echo "🔹 显示最近 $COUNT 个版本"
echo ""
echo "----------------------------------------"
printf "%-10s | %-16s | %-50s\n" "版本SHA" "提交时间" "提交信息"
echo "----------------------------------------"
git log --oneline --date=format:'%Y-%m-%d %H:%M' \
--pretty=format:'%h | %ad | %s' \
-$COUNT $BRANCH
echo ""
echo "----------------------------------------"
echo ""
echo "💡 回滚方法:"
echo ""
echo "1⃣ SSH 到服务器修改 .env 文件:"
echo " cd /root/bindbox"
echo " echo 'PPANEL_SERVER_TAG=<版本SHA>' > .env"
echo " docker-compose -f docker-compose.cloud.yml pull ppanel-server"
echo " docker-compose -f docker-compose.cloud.yml up -d ppanel-server"
echo ""
echo "2⃣ 或者本地 Git 回滚后重新推送:"
echo " git reset --hard <版本SHA>"
echo " git push -f origin $BRANCH"
echo ""
echo "========================================"