Added possibility to build from custom branch

This commit is contained in:
Alexey Pustovalov
2023-12-15 22:38:54 +09:00
parent 3a3e9f68af
commit 7dcdf4e1dc
16 changed files with 32 additions and 16 deletions

View File

@@ -10,6 +10,7 @@ ARG MAJOR_VERSION
ARG RELEASE
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG GIT_BRANCH=master
LABEL description="Zabbix build base for SQLite3 based images" \
maintainer="alexey.pustovalov@zabbix.com" \
@@ -47,7 +48,7 @@ RUN set -eux && \
*) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \
esac; \
cd /tmp/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
cd /tmp/zabbix-${ZBX_VERSION} && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \