Skip to content

Commit

Permalink
fix workflow watch-mdcx
Browse files Browse the repository at this point in the history
  • Loading branch information
northsea4 committed Jan 5, 2024
1 parent 8eb2971 commit 9bce063
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/watch-mdcx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ jobs:
# tag名称,作为版本号
local tagName=$(printf '%s' $_content | jq -r ".tag_name")
local archiveVersion=$(echo $tagName | sed 's/v//g')
if [[ -z "$archiveVersion" || "$archiveVersion" == "null" ]]; then
echo "❌ 获取版本号失败!"
return 1
fi
# 源码压缩包(tar格式)链接
local archiveUrl=$(printf '%s' $_content | jq -r ".tarball_url")
Expand All @@ -84,11 +89,11 @@ jobs:
# -r 如果过滤的结果是一个字符串,那么直接写到标准输出(去掉字符串的引号);
local updatedAt=$(printf '%s' $_content | jq -r '.updated_at')
# 如果没有`updated_at`,则取`published_at`
if [[ -z "$updatedAt" || "$updatedAt" == 'null' ]]; then
if [[ -z "$updatedAt" || "$updatedAt" == "null" ]]; then
updatedAt=$(printf '%s' $_content | jq -r '.published_at')
fi
if [[ -z "$updatedAt" ]]; then
if [[ -z "$updatedAt" || "$updatedAt" == "null" ]]; then
echo "❌ 获取更新时间失败!"
return 1
fi
Expand Down

0 comments on commit 9bce063

Please sign in to comment.