Nextcloud-App/test.sh

19 lines
512 B
Bash
Raw Permalink Normal View History

2021-10-10 17:51:12 +00:00
#!/bin/bash
set -xeuo pipefail
IFS=$'\n\t'
if [[ -x "$(command -v podman)" ]]; then
CONTAINER_RUNTIME="$(command -v podman 2> /dev/null)"
elif [[ -x "$(command -v docker)" ]]; then
CONTAINER_RUNTIME="$(command -v docker 2> /dev/null)"
2021-10-10 17:51:12 +00:00
else
echo "Container runtime (docker/podman) not found!"
exit 1
fi
2023-10-11 19:55:03 +00:00
export APACHE_RUN_USER=33
export APACHE_RUN_GROUP=0
$CONTAINER_RUNTIME exec --user "${APACHE_RUN_USER}:${APACHE_RUN_GROUP}" nextcloud bash -c 'cd /var/www/html/custom_apps/upschooling && make test'