diff --git a/Dockerfile.py b/Dockerfile.py index 2d43883..5a0ca5d 100755 --- a/Dockerfile.py +++ b/Dockerfile.py @@ -38,7 +38,8 @@ os_base_vars = { __version__ = None dot = os.path.abspath('.') with open('{}/VERSION'.format(dot), 'r') as v: - __version__ = v.read().strip() + raw_version = v.read().strip() + __version__ = raw_version.replace('release/', 'release-') images = { __version__: [ diff --git a/Dockerfile_aarch64 b/Dockerfile_aarch64 index 72a28b6..3ae8829 100644 --- a/Dockerfile_aarch64 +++ b/Dockerfile_aarch64 @@ -35,11 +35,11 @@ ENV ServerIP 0.0.0.0 ENV FTL_CMD no-daemon ENV DNSMASQ_USER root -ENV VERSION v4.2.2 +ENV VERSION release-v4.3 ENV ARCH aarch64 ENV PATH /opt/pihole:${PATH} -LABEL image="pihole/pihole:v4.2.2_aarch64" +LABEL image="pihole/pihole:release-v4.3_aarch64" LABEL maintainer="adam@diginc.us" LABEL url="https://www.github.com/pi-hole/docker-pi-hole" diff --git a/Dockerfile_amd64 b/Dockerfile_amd64 index c9affac..ab013d2 100644 --- a/Dockerfile_amd64 +++ b/Dockerfile_amd64 @@ -35,11 +35,11 @@ ENV ServerIP 0.0.0.0 ENV FTL_CMD no-daemon ENV DNSMASQ_USER root -ENV VERSION v4.2.2 +ENV VERSION release-v4.3 ENV ARCH amd64 ENV PATH /opt/pihole:${PATH} -LABEL image="pihole/pihole:v4.2.2_amd64" +LABEL image="pihole/pihole:release-v4.3_amd64" LABEL maintainer="adam@diginc.us" LABEL url="https://www.github.com/pi-hole/docker-pi-hole" diff --git a/Dockerfile_armel b/Dockerfile_armel index fbac05b..b3d5805 100644 --- a/Dockerfile_armel +++ b/Dockerfile_armel @@ -35,11 +35,11 @@ ENV ServerIP 0.0.0.0 ENV FTL_CMD no-daemon ENV DNSMASQ_USER root -ENV VERSION v4.2.2 +ENV VERSION release-v4.3 ENV ARCH armel ENV PATH /opt/pihole:${PATH} -LABEL image="pihole/pihole:v4.2.2_armel" +LABEL image="pihole/pihole:release-v4.3_armel" LABEL maintainer="adam@diginc.us" LABEL url="https://www.github.com/pi-hole/docker-pi-hole" diff --git a/Dockerfile_armhf b/Dockerfile_armhf index c0dcc42..0411fe9 100644 --- a/Dockerfile_armhf +++ b/Dockerfile_armhf @@ -35,11 +35,11 @@ ENV ServerIP 0.0.0.0 ENV FTL_CMD no-daemon ENV DNSMASQ_USER root -ENV VERSION v4.2.2 +ENV VERSION release-v4.3 ENV ARCH armhf ENV PATH /opt/pihole:${PATH} -LABEL image="pihole/pihole:v4.2.2_armhf" +LABEL image="pihole/pihole:release-v4.3_armhf" LABEL maintainer="adam@diginc.us" LABEL url="https://www.github.com/pi-hole/docker-pi-hole" diff --git a/VERSION b/VERSION index ec151ba..98720d8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v4.2.2 +release/v4.3 diff --git a/deploy_docker.sh b/deploy_docker.sh index 1501dcb..db43e4a 100755 --- a/deploy_docker.sh +++ b/deploy_docker.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -# Script for manually pushing the docker arm images for diginc only +# Script for manually pushing the docker arm images for pi-hole org members only # (no one else has docker repo permissions) if [ ! -f ~/.docker/config.json ] ; then echo "Error: You should setup your docker push authorization first" @@ -7,7 +7,9 @@ if [ ! -f ~/.docker/config.json ] ; then fi parse_git_branch() { - git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' + var="$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')" + # convert release/ to release- + echo "${var/release\//release-}" } annotate() { diff --git a/install.sh b/install.sh index 7456b91..cf4e957 100755 --- a/install.sh +++ b/install.sh @@ -4,21 +4,20 @@ mkdir -p /etc/pihole/ mkdir -p /var/run/pihole # Production tags with valid web footers export CORE_VERSION="$(cat /etc/docker-pi-hole-version)" -# Major.Minor for web tag until patches are released for it -export WEB_VERSION="$(echo ${CORE_VERSION} | grep -Po "v\d+\.\d+")" +export WEB_VERSION="${CORE_VERSION}" + # Only use for pre-production / testing -export USE_CUSTOM_BRANCHES=false +export CHECKOUT_BRANCHES=false +# Search for release/* branch naming convention for custom checkouts +if [[ "$CORE_VERSION" == *"release/"* ]] ; then + CHECKOUT_BRANCHES=true +fi apt-get update apt-get install -y curl procps curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / mv /init /s6-init -if [[ $USE_CUSTOM_BRANCHES == true ]] ; then - CORE_VERSION="hotfix/${CORE_VERSION}" - WEB_VERSION="release/v4.2" -fi - # debconf-apt-progress seems to hang so get rid of it too which debconf-apt-progress mv "$(which debconf-apt-progress)" /bin/no_debconf-apt-progress @@ -68,7 +67,7 @@ FTLdetect 2>&1 | tee "${tmpLog}" installPihole 2>&1 | tee "${tmpLog}" mv "${tmpLog}" / -if [[ $USE_CUSTOM_BRANCHES == true ]] ; then +if [[ $CHECKOUT_BRANCHES == true ]] ; then ln -s /bin/true /usr/local/bin/service ln -s /bin/true /usr/local/bin/update-rc.d echo y | bash -x pihole checkout core ${CORE_VERSION} diff --git a/test/conftest.py b/test/conftest.py index 3cd969e..478ba19 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -9,7 +9,8 @@ check_output = testinfra.get_backend( __version__ = None dotdot = os.path.abspath(os.path.join(os.path.abspath(__file__), os.pardir, os.pardir)) with open('{}/VERSION'.format(dotdot), 'r') as v: - __version__ = v.read().strip() + raw_version = v.read().strip() + __version__ = raw_version.replace('release/', 'release-') @pytest.fixture() def args_dns():