Ignore release candidate for Nextcloud update

This commit is contained in:
Jeremy Gardais 2022-03-14 09:19:17 +01:00
parent 701b1fc6f4
commit f2eb26eeaa
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 6 additions and 6 deletions

View File

@ -67,8 +67,8 @@ nc_app_new_version_file="/tmp/.github.nextcloud.app.upgrade"
# Check Nextcloud upgrade {{{
# Get the 3 last tags releses for Nextcloud
## Exclude tag starting with "v", and those contains alpha, beta or RC
rm -f -- "${nc_new_version_list}" ; touch -- "${nc_new_version_list}"
"${script_wd}"/releasetags "${nc_repo_url}" | grep -v -E -- "(alpha|beta|RC)" | sed 's/^v//' | head -n3 >> "${nc_new_version_list}"
rm --force -- "${nc_new_version_list}" ; touch -- "${nc_new_version_list}"
"${script_wd}"/releasetags "${nc_repo_url}" | grep -v -E -- "(alpha|beta|RC|rc)" | sed 's/^v//' | head -n3 >> "${nc_new_version_list}"
# For all tags contained in the tag list
while IFS= read -r nc_new_version; do
@ -99,17 +99,17 @@ while IFS= read -r nc_new_version; do
## If no previous upgrade was already detected
if [ ! -s "${nc_app_new_version_file}" ]; then
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG: Test version — The current version is up-to-date."
rm -f -- "${nc_new_version_file}"
rm --force -- "${nc_new_version_file}"
fi
fi
# }}}
done < "${nc_new_version_list}"
rm -f -- "${nc_new_version_list}"
rm --force -- "${nc_new_version_list}"
# }}}
# Check apps upgrade {{{
rm -f -- "${nc_app_new_version_file}" ; touch -- "${nc_app_new_version_file}"
rm --force -- "${nc_app_new_version_file}" ; touch -- "${nc_app_new_version_file}"
printf '%s' "${nc_app_upgrade}" >> "${nc_app_new_version_file}"
## If the file exists with a size bigger than 0
@ -117,7 +117,7 @@ if [ -s "${nc_app_new_version_file}" ]; then
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG: Apps test — Upgrade seems to be available for apps. Please check ${nc_app_new_version_file}."
else
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG: Apps test — All apps seems up-to-date."
rm -f -- "${nc_app_new_version_file}"
rm --force -- "${nc_app_new_version_file}"
fi
# }}}