From d64da1c97fa8dd12cf61b701e750d5f397b175f8 Mon Sep 17 00:00:00 2001 From: thelamer Date: Sun, 20 Jan 2019 01:08:40 -0800 Subject: [PATCH] updating download logic to use git as it is required for versioning in the application --- Dockerfile | 11 +++++------ Dockerfile.aarch64 | 11 +++++------ Dockerfile.armhf | 11 +++++------ 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index df5cba1..dabd20e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,12 +43,11 @@ RUN \ | jq -r '. | .sha'); \ fi && \ mkdir -p /app/headphones && \ - curl -o \ - /tmp/headphones.tar.gz -L \ - "https://github.com/rembo10/headphones/archive/${HEADPHONES_COMMIT}.tar.gz" && \ - tar xf \ - /tmp/headphones.tar.gz -C \ - /app/headphones --strip-components=1 && \ + cd /app/headphones && \ + git init && \ + git remote add origin https://github.com/rembo10/headphones.git && \ + git fetch --depth 1 origin ${HEADPHONES_COMMIT} && \ + git checkout FETCH_HEAD && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index c0a0631..c28e6ae 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -46,12 +46,11 @@ RUN \ | jq -r '. | .sha'); \ fi && \ mkdir -p /app/headphones && \ - curl -o \ - /tmp/headphones.tar.gz -L \ - "https://github.com/rembo10/headphones/archive/${HEADPHONES_COMMIT}.tar.gz" && \ - tar xf \ - /tmp/headphones.tar.gz -C \ - /app/headphones --strip-components=1 && \ + cd /app/headphones && \ + git init && \ + git remote add origin https://github.com/rembo10/headphones.git && \ + git fetch --depth 1 origin ${HEADPHONES_COMMIT} && \ + git checkout FETCH_HEAD && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 5ca4b12..fc0cbe9 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -46,12 +46,11 @@ RUN \ | jq -r '. | .sha'); \ fi && \ mkdir -p /app/headphones && \ - curl -o \ - /tmp/headphones.tar.gz -L \ - "https://github.com/rembo10/headphones/archive/${HEADPHONES_COMMIT}.tar.gz" && \ - tar xf \ - /tmp/headphones.tar.gz -C \ - /app/headphones --strip-components=1 && \ + cd /app/headphones && \ + git init && \ + git remote add origin https://github.com/rembo10/headphones.git && \ + git fetch --depth 1 origin ${HEADPHONES_COMMIT} && \ + git checkout FETCH_HEAD && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \