1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wikijs_ynh.git synced 2024-09-03 20:36:09 +02:00

Update updater.sh

This commit is contained in:
yalh76 2023-08-04 21:00:04 +02:00
parent 05ad4cbb29
commit fb0b70c657

View file

@ -24,7 +24,7 @@ assets="https://github.com/Requarks/wiki/releases/download/$version/wiki-js.tar.
# Sometimes the release name starts with a "v", so let's filter it out.
# You may need more tweaks here if the upstream repository has different naming conventions.
if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then
version=${version:1}
version=${version:1}
fi
# Setting up the environment variables
@ -36,12 +36,12 @@ echo "PROCEED=false" >> $GITHUB_ENV
# Proceed only if the retrieved version is greater than the current one
if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then
echo "::warning ::No new version available"
exit 0
echo "::warning ::No new version available"
exit 0
# Proceed only if a PR for this new version does not already exist
elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then
echo "::warning ::A branch already exists for this update"
exit 0
echo "::warning ::A branch already exists for this update"
exit 0
fi
#=================================================