File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 5757 elif [ -f build.gradle ] || [ -f build.gradle.kts ]; then
5858 chmod +x ./gradlew
5959 ./gradlew clean build
60- artifact=$(ls build/libs/*.jar | head -n1)
60+ artifact=$(ls build/libs/*.jar | grep -v -- '-dev.jar' | head -n1)
6161 else
6262 echo "No recognized build file found in $branch"
6363 continue
6767
6868 # 解析文件名得到 version(去掉 .jar)
6969 filename=$(basename "$artifact")
70- version="${ filename%.jar}"
71- echo "Version: $version "
70+ fabric_ver=$(echo "$ filename" | grep -oP 'mc\K[0-9]+\.[0-9]+(\.[0-9]+)?')
71+ echo "MC Version: $fabric_ver "
7272
73- # 根据 Fabric 版本生成 JSON 数组形式 game-versions
74- fabric_ver=$(echo "$version" | sed 's/^Fabric-//')
7573 case "$fabric_ver" in
7674 1.16.5) game_versions='["1.16.x"]';;
7775 1.17.1) game_versions='["1.17.x"]';;
You can’t perform that action at this time.
0 commit comments