File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 - name : Check version
2222 id : version-check
2323 run : |
24- chmod +x ./scripts/is-newer-version.bash
25- chmod +x ./scripts/get-version.bash
2624 VERSION=$(./scripts/is-newer-version.bash)
2725 echo "version=${VERSION}" >> $GITHUB_OUTPUT
2826 if [ "$VERSION" != "0" ]; then
Original file line number Diff line number Diff line change 22
33< html >
44 < markdown-html
5- version ="1.18.7 "
5+ version ="1.18.8 "
66 author ="PJ568 "
77 repo ="https://github.com/PJ-568/markdown.html "
88 license ="CC BY-SA 4.0 International "
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ if [ ! -f "$FILE_PATH" ]; then
3636fi
3737
3838# # 从 <markdown-html> 标签中提取第一个 version 属性的值
39- VERSION=$( grep -oP ' <markdown-html\s+version="\K[^"]+' " $FILE_PATH " | head -1)
39+ # 使用 tr 删除换行符,使整个文件成为单行
40+ VERSION=$( tr -d ' \n' < " $FILE_PATH " | grep -oP ' <markdown-html\s+version="\K[^"]+' )
4041if [ -z " $VERSION " ]; then
4142 recho " 错误:未找到版本号" " Error: Version not found"
4243 exit 1
You can’t perform that action at this time.
0 commit comments