mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
Update updater script
This commit is contained in:
parent
d10453c480
commit
3cc056fd46
1 changed files with 1 additions and 6 deletions
7
.github/workflows/updater.sh
vendored
7
.github/workflows/updater.sh
vendored
|
@ -17,7 +17,7 @@
|
||||||
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://git.spip.net/")[1]')
|
repo=$(cat manifest.json | jq -j '.upstream.code|split("https://git.spip.net/")[1]')
|
||||||
# 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://git.spip.net/api/v1/repos/spip/spip/tags" | jq -r '.[] | .name' | sort -V | tail -1)
|
version=$(curl --silent "https://git.spip.net/api/v1/repos/spip/spip/tags" | jq -r '.[] | .name' | grep -v "alpha" | grep -v "beta" | grep -v "rc" | sort -V | tail -1)
|
||||||
assets=("https://files.spip.net/spip/archives/spip-$version.zip")
|
assets=("https://files.spip.net/spip/archives/spip-$version.zip")
|
||||||
|
|
||||||
# Later down the script, we assume the version has only digits and dots
|
# Later down the script, we assume the version has only digits and dots
|
||||||
|
@ -27,11 +27,6 @@ if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then
|
||||||
version=${version:1}
|
version=${version:1}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $version == *"-alpha" || $version == *"-beta" ]]; then
|
|
||||||
echo "::warning ::This is not a release version"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Setting up the environment variables
|
# Setting up the environment variables
|
||||||
echo "Current version: $current_version"
|
echo "Current version: $current_version"
|
||||||
echo "Latest release from upstream: $version"
|
echo "Latest release from upstream: $version"
|
||||||
|
|
Loading…
Reference in a new issue