We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a610134 commit 8144fb3Copy full SHA for 8144fb3
release_files/install.sh
@@ -40,11 +40,13 @@ get_release() {
40
local TAG="tags/${RELEASE}"
41
local URL="https://api.github.com/repos/${OWNER}/${REPO}/releases/${TAG}"
42
fi
43
+ OUTPUT=""
44
if [ -n "$GITHUB_TOKEN" ]; then
- TAG_NAME=$(curl -H "Authorization: token ${GITHUB_TOKEN}" -s "${URL}" | grep '"tag_name":')
45
+ OUTPUT=$(curl -H "Authorization: token ${GITHUB_TOKEN}" -s "${URL}")
46
else
- TAG_NAME=$(curl -s "${URL}" | grep '"tag_name":')
47
+ OUTPUT=$(curl -s "${URL}")
48
49
+ TAG_NAME=$(echo ${OUTPUT} | grep -Eo '\"tag_name\":\s*\"v([0-9]+\.){2}[0-9]+"' | tail -n 1)
50
echo "${TAG_NAME}" | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+'
51
}
52
0 commit comments