Nextcloud-App/test.sh

18 lines
479 B
Bash
Executable File

#!/bin/bash
set -xeuo pipefail
IFS=$'\n\t'
DIR="$(realpath ${0%/*})"
RUNTIME_IS_PODMAN="false"
if [[ -x "$(which podman)" ]]; then
CONTAINER_RUNTIME="$(which podman 2> /dev/null)"
RUNTIME_IS_PODMAN="true"
elif [[ -x "$(which docker)" ]]; then
CONTAINER_RUNTIME="$(which docker 2> /dev/null)"
else
echo "Container runtime (docker/podman) not found!"
exit 1
fi
$CONTAINER_RUNTIME exec --user 33 nextcloud bash -c 'cd /var/www/html/custom_apps/upschooling && make test'