From 6eff7cf6dea80702043eeda700ff7f13188a9f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Kn=C3=B6ppler?= <6317548+theCalcaholic@users.noreply.github.com> Date: Fri, 20 Jan 2023 19:53:34 +0100 Subject: [PATCH] Dockerfile: Disable branch pinning as it has no effect during build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com> --- bin/ncp-update | 15 +++++++++------ build/docker/Dockerfile | 4 +--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bin/ncp-update b/bin/ncp-update index b6f7a333f..25753417f 100755 --- a/bin/ncp-update +++ b/bin/ncp-update @@ -29,14 +29,16 @@ fi } # shellcheck disable=SC2164 - [[ -f /.ncp-image ]] || cd "$TMPDIR" # update locally during build + [[ -f /.ncp-image ]] || { + cd "$TMPDIR" # update locally during build - [[ -z "$2" ]] || { - git fetch origin "$2" || { - echo "Error: Could not fetch $2" - exit 1 + [[ -z "$2" ]] || { + git fetch origin "$2" || { + echo "Error: Could not fetch $2" + exit 1 + } + git checkout FETCH_HEAD } - git checkout FETCH_HEAD } echo -e "Performing updates" @@ -61,4 +63,5 @@ fi echo -e "NextCloudPi updated to version $VER" exit 0 + } # force to read the whole thing into memory, as its contents might change in update.sh diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index 7c1da624e..a0e1b3766 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -170,9 +170,7 @@ apt-get install --no-install-recommends -y wget ca-certificates; \ # install nextcloudpiset_app_param nc-datadir.sh DATADIR '/data-ro/ncdata' \ source /usr/local/etc/library.sh; \ cd /tmp/ncp-build/; \ -branch=master; \ -[[ "$ncp_ver" == "v0.0.0" ]] || branch="$ncp_ver"; \ -BRANCH="$branch" install_app ncp.sh; \ +install_app ncp.sh; \ mv /usr/local/etc/ncp-config.d/nc-init-copy.cfg /usr/local/etc/ncp-config.d/nc-init.cfg; \ run_app_unsafe bin/ncp/CONFIG/nc-init.sh; \