From d46bc718c19a462403c9114a22de99d363917280 Mon Sep 17 00:00:00 2001 From: sn0w Date: Wed, 28 Aug 2019 18:57:19 +0200 Subject: [PATCH] Add missing pull when PLEROMA_VERSION is a branch --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e620de1..c117354 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,10 +65,14 @@ ARG __CACHE_TAG ENV __CACHE_TAG $__CACHE_TAG # Fetch changes, checkout +# Only pull if the version-string happens to be a branch ARG PLEROMA_VERSION RUN \ git fetch --all && \ - git checkout $PLEROMA_VERSION + git checkout $PLEROMA_VERSION && \ + if git show-ref --quiet "refs/heads/$PLEROMA_VERSION"; then \ + git pull --rebase --autostash; \ + fi # Precompile RUN \