mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
fix get latest tag
This commit is contained in:
parent
d9920609b0
commit
709d4ed14a
2
.github/workflows/data.yml
vendored
2
.github/workflows/data.yml
vendored
@ -43,7 +43,7 @@ jobs:
|
|||||||
|
|
||||||
TAG=""
|
TAG=""
|
||||||
if [ "${PRERELEASE}" = "true" ]; then
|
if [ "${PRERELEASE}" = "true" ]; then
|
||||||
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep /refs/tags/.*\.zip | head -1 | sed -r 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/')"
|
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep /refs/tags/.*\.zip | sed -r 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)"
|
||||||
else
|
else
|
||||||
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
|
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
|
||||||
TAG="${LATESTURL##*/}"
|
TAG="${LATESTURL##*/}"
|
||||||
|
2
.github/workflows/issues.yml
vendored
2
.github/workflows/issues.yml
vendored
@ -151,7 +151,7 @@ jobs:
|
|||||||
|
|
||||||
TAG=""
|
TAG=""
|
||||||
if [ "${PRERELEASE}" = "true" ]; then
|
if [ "${PRERELEASE}" = "true" ]; then
|
||||||
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep /refs/tags/.*\.zip | head -1 | sed -r 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/')"
|
TAG="$(curl -skL --connect-timeout 10 "${REPO}/tags" | grep /refs/tags/.*\.zip | sed -r 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)"
|
||||||
else
|
else
|
||||||
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
|
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${REPO}/releases/latest")"
|
||||||
TAG="${LATESTURL##*/}"
|
TAG="${LATESTURL##*/}"
|
||||||
|
@ -2666,7 +2666,7 @@ function downloadExts() {
|
|||||||
TAG=""
|
TAG=""
|
||||||
if [ "${PRERELEASE}" = "true" ]; then
|
if [ "${PRERELEASE}" = "true" ]; then
|
||||||
# TAG="$(curl -skL --connect-timeout 10 "${PROXY}${3}/tags" | pup 'a[class="Link--muted"] attr{href}' | grep ".zip" | head -1)"
|
# TAG="$(curl -skL --connect-timeout 10 "${PROXY}${3}/tags" | pup 'a[class="Link--muted"] attr{href}' | grep ".zip" | head -1)"
|
||||||
TAG="$(curl -skL --connect-timeout 10 "${PROXY}${3}/tags" | grep /refs/tags/.*\.zip | head -1 | sed -r 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/')"
|
TAG="$(curl -skL --connect-timeout 10 "${PROXY}${3}/tags" | grep /refs/tags/.*\.zip | sed -r 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/' | sort -rV | head -1)"
|
||||||
else
|
else
|
||||||
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${PROXY}${3}/releases/latest")"
|
LATESTURL="$(curl -skL --connect-timeout 10 -w %{url_effective} -o /dev/null "${PROXY}${3}/releases/latest")"
|
||||||
TAG="${LATESTURL##*/}"
|
TAG="${LATESTURL##*/}"
|
||||||
|
@ -76,7 +76,7 @@ function getBuildroot() {
|
|||||||
local CACHE_FILE="/tmp/buildroot.zip"
|
local CACHE_FILE="/tmp/buildroot.zip"
|
||||||
rm -f "${CACHE_FILE}"
|
rm -f "${CACHE_FILE}"
|
||||||
if [ "${2}" = "true" ]; then
|
if [ "${2}" = "true" ]; then
|
||||||
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-buildroot/releases" | jq -r ".[0].tag_name")
|
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-buildroot/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
|
||||||
else
|
else
|
||||||
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-buildroot/releases/latest" | jq -r ".tag_name")
|
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-buildroot/releases/latest" | jq -r ".tag_name")
|
||||||
fi
|
fi
|
||||||
@ -108,7 +108,7 @@ function getCKs() {
|
|||||||
local CACHE_FILE="/tmp/rr-cks.zip"
|
local CACHE_FILE="/tmp/rr-cks.zip"
|
||||||
rm -f "${CACHE_FILE}"
|
rm -f "${CACHE_FILE}"
|
||||||
if [ "${2}" = "true" ]; then
|
if [ "${2}" = "true" ]; then
|
||||||
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-cks/releases" | jq -r ".[0].tag_name")
|
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-cks/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
|
||||||
else
|
else
|
||||||
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-cks/releases/latest" | jq -r ".tag_name")
|
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-cks/releases/latest" | jq -r ".tag_name")
|
||||||
fi
|
fi
|
||||||
@ -137,7 +137,7 @@ function getLKMs() {
|
|||||||
local CACHE_FILE="/tmp/rp-lkms.zip"
|
local CACHE_FILE="/tmp/rp-lkms.zip"
|
||||||
rm -f "${CACHE_FILE}"
|
rm -f "${CACHE_FILE}"
|
||||||
if [ "${2}" = "true" ]; then
|
if [ "${2}" = "true" ]; then
|
||||||
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-lkms/releases" | jq -r ".[0].tag_name")
|
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-lkms/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
|
||||||
else
|
else
|
||||||
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-lkms/releases/latest" | jq -r ".tag_name")
|
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-lkms/releases/latest" | jq -r ".tag_name")
|
||||||
fi
|
fi
|
||||||
@ -166,7 +166,7 @@ function getAddons() {
|
|||||||
local CACHE_DIR="/tmp/addons"
|
local CACHE_DIR="/tmp/addons"
|
||||||
local CACHE_FILE="/tmp/addons.zip"
|
local CACHE_FILE="/tmp/addons.zip"
|
||||||
if [ "${2}" = "true" ]; then
|
if [ "${2}" = "true" ]; then
|
||||||
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-addons/releases" | jq -r ".[0].tag_name")
|
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-addons/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
|
||||||
else
|
else
|
||||||
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-addons/releases/latest" | jq -r ".tag_name")
|
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-addons/releases/latest" | jq -r ".tag_name")
|
||||||
fi
|
fi
|
||||||
@ -206,7 +206,7 @@ function getModules() {
|
|||||||
local CACHE_FILE="/tmp/modules.zip"
|
local CACHE_FILE="/tmp/modules.zip"
|
||||||
rm -f "${CACHE_FILE}"
|
rm -f "${CACHE_FILE}"
|
||||||
if [ "${2}" = "true" ]; then
|
if [ "${2}" = "true" ]; then
|
||||||
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-modules/releases" | jq -r ".[0].tag_name")
|
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-modules/releases" | jq -r ".[].tag_name" | sort -rV | head -1)
|
||||||
else
|
else
|
||||||
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-modules/releases/latest" | jq -r ".tag_name")
|
TAG=$(curl -skL -H "Authorization: token ${TOKEN}" "https://api.github.com/repos/RROrg/rr-modules/releases/latest" | jq -r ".tag_name")
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user