ncp-check-version: Check for docker-stable branch if running docker

Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias Knöppler 2023-07-12 11:23:17 +02:00
parent ed337627ba
commit 05ad72685a
No known key found for this signature in database
GPG Key ID: 3510056072886A8F

View File

@ -5,7 +5,10 @@
TMPDIR="$( mktemp -d /tmp/ncp-check.XXXXXX || ( echo "Failed to create temp dir. Exiting" >&2; exit 1 ) )"
trap "rm -rf \"${TMPDIR}\"; exit 0" 0 1 2 3 15
git clone --depth 20 -q --bare https://github.com/nextcloud/nextcloudpi.git "$TMPDIR" || {
BRANCH="master"
is_docker && BRANCH="docker-stable"
git clone -b "$BRANCH" --depth 20 -q --bare https://github.com/nextcloud/nextcloudpi.git "$TMPDIR" || {
echo "The git clone command failed: No connectivity to https://github.com ?" >&2
exit 1
}