mirror of
https://github.com/YunoHost-Apps/jackett_ynh.git
synced 2024-09-03 19:26:28 +02:00
Fix REPO env variable for auto-updater
This commit is contained in:
parent
455942e080
commit
232ea64517
1 changed files with 1 additions and 3 deletions
4
.github/workflows/updater.sh
vendored
4
.github/workflows/updater.sh
vendored
|
@ -9,9 +9,6 @@
|
||||||
# Since each app is different, maintainers can adapt its contents so as to perform
|
# Since each app is different, maintainers can adapt its contents so as to perform
|
||||||
# automatic actions when a new upstream release is detected.
|
# automatic actions when a new upstream release is detected.
|
||||||
|
|
||||||
# Remove this exit command when you are ready to run this Action
|
|
||||||
#exit 1
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# FETCHING LATEST RELEASE AND ITS ASSETS
|
# FETCHING LATEST RELEASE AND ITS ASSETS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -19,6 +16,7 @@
|
||||||
# Fetching information
|
# Fetching information
|
||||||
current_version=$(cat manifest.json | jq -j '.version|split("~")[0]')
|
current_version=$(cat manifest.json | jq -j '.version|split("~")[0]')
|
||||||
repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]')
|
repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]')
|
||||||
|
echo "REPO=$repo" >> $GITHUB_ENV
|
||||||
# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions)
|
# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions)
|
||||||
version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1)
|
version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1)
|
||||||
assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'"))
|
assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'"))
|
||||||
|
|
Loading…
Reference in a new issue