Check PHP dependencies in daily.sh (#12260)

This commit is contained in:
Jellyfrog
2020-10-29 01:34:42 +01:00
committed by GitHub
parent 4746c3f9d0
commit d82d2f1f19
2 changed files with 17 additions and 2 deletions

View File

@@ -72,7 +72,7 @@ status_run() {
else
printf " \033[0;31mFAIL\033[0m\n";
if [[ "${arg_option}" == "update" ]]; then
php "${LIBRENMS_DIR}/daily.php" -f notify -o "${tmp}"
php "${LIBRENMS_DIR}/daily.php" -f notify -o "${tmp}" > /dev/null 2>&1
fi
if [[ ! -z "${tmp}" ]]; then
# print output in case of failure
@@ -126,6 +126,9 @@ set_notifiable_result() {
# Exit-Code: 0 >= min ver, 1 < min ver
#######################################
check_dependencies() {
# Check first, no point in continuing otherwise.
php_dependencies
local branch=$(git rev-parse --abbrev-ref HEAD)
scripts/check_requirements.py > /dev/null 2>&1 || pip3 install -r requirements.txt > /dev/null 2>&1
@@ -178,6 +181,17 @@ check_dependencies() {
return 1;
}
#######################################
# The check-platform-reqs command checks that your PHP and extensions versions match the platform requirements of the installed packages
#
# Returns:
# Exits on error
#######################################
php_dependencies() {
status_run 'Checking PHP dependencies' "${COMPOSER} check-platform-reqs --no-dev --no-cache" 'update' || exit 1
return 0
}
#######################################
# Compare two numeric versions
# Arguments: