Nextcloud-App/test.sh

19 lines
500 B
Bash
Raw Normal View History

2021-10-10 17:51:12 +00:00
#!/bin/bash
set -xeuo pipefail
IFS=$'\n\t'
DIR="$(realpath ${0%/*})"
RUNTIME_IS_PODMAN="false"
if [[ -x "$(command -v podman)" ]]; then
CONTAINER_RUNTIME="$(command -v podman 2> /dev/null)"
2021-10-10 17:51:12 +00:00
RUNTIME_IS_PODMAN="true"
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
$CONTAINER_RUNTIME exec --user 33 nextcloud bash -c 'cd /var/www/html/custom_apps/upschooling && make test'