From 4fc239fc8071a4d991926d62931b8d0486877544 Mon Sep 17 00:00:00 2001 From: thelamer Date: Sun, 20 Jan 2019 01:26:17 -0800 Subject: [PATCH] reverting the versioning logic to pull the commit at build time, despite race conditions it is the cleanest way to pull a specific commit from github --- Dockerfile | 13 +------------ Dockerfile.aarch64 | 13 +------------ Dockerfile.armhf | 13 +------------ 3 files changed, 3 insertions(+), 36 deletions(-) diff --git a/Dockerfile b/Dockerfile index dabd20e..4263cde 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,6 @@ FROM lsiobase/alpine.python:3.8 # set version label ARG BUILD_DATE ARG VERSION -ARG HEADPHONES_COMMIT LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="sparklyballs" @@ -15,7 +14,6 @@ RUN \ apk add --no-cache --virtual=build-dependencies \ g++ \ gcc \ - jq \ make && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ @@ -38,16 +36,7 @@ RUN \ make && \ make install && \ echo "**** install app ****" && \ - if [ -z ${HEADPHONES_COMMIT+x} ]; then \ - HEADPHONES_COMMIT=$(curl -sX GET https://api.github.com/repos/rembo10/headphones/commits/master \ - | jq -r '. | .sha'); \ - fi && \ - mkdir -p /app/headphones && \ - 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 && \ + git clone --depth 1 https://github.com/rembo10/headphones.git /app/headphones && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index c28e6ae..7545928 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -6,7 +6,6 @@ COPY qemu-aarch64-static /usr/bin # set version label ARG BUILD_DATE ARG VERSION -ARG HEADPHONES_COMMIT LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="sparklyballs" @@ -18,7 +17,6 @@ RUN \ apk add --no-cache --virtual=build-dependencies \ g++ \ gcc \ - jq \ make && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ @@ -41,16 +39,7 @@ RUN \ make && \ make install && \ echo "**** install app ****" && \ - if [ -z ${HEADPHONES_COMMIT+x} ]; then \ - HEADPHONES_COMMIT=$(curl -sX GET https://api.github.com/repos/rembo10/headphones/commits/master \ - | jq -r '. | .sha'); \ - fi && \ - mkdir -p /app/headphones && \ - 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 && \ + git clone --depth 1 https://github.com/rembo10/headphones.git /app/headphones && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index fc0cbe9..5ec1361 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -6,7 +6,6 @@ COPY qemu-arm-static /usr/bin # set version label ARG BUILD_DATE ARG VERSION -ARG HEADPHONES_COMMIT LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="sparklyballs" @@ -18,7 +17,6 @@ RUN \ apk add --no-cache --virtual=build-dependencies \ g++ \ gcc \ - jq \ make && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ @@ -41,16 +39,7 @@ RUN \ make && \ make install && \ echo "**** install app ****" && \ - if [ -z ${HEADPHONES_COMMIT+x} ]; then \ - HEADPHONES_COMMIT=$(curl -sX GET https://api.github.com/repos/rembo10/headphones/commits/master \ - | jq -r '. | .sha'); \ - fi && \ - mkdir -p /app/headphones && \ - 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 && \ + git clone --depth 1 https://github.com/rembo10/headphones.git /app/headphones && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \