Skip bootstrap for exchange/merchant tarballs to avoid git checks

This commit is contained in:
nocci 2025-12-12 11:38:08 +00:00
parent 96465d6267
commit 831a473fbe

View file

@ -68,6 +68,7 @@ RUN set -e; \
RUN set -e; \ RUN set -e; \
# Exchange # Exchange
EXCHANGE_DIR=""; \ EXCHANGE_DIR=""; \
EXCHANGE_TAR=0; \
if ls /vendor/exchange*.tar.gz >/dev/null 2>&1; then \ if ls /vendor/exchange*.tar.gz >/dev/null 2>&1; then \
LOCAL_TARBALL="$(ls /vendor/exchange*.tar.gz | head -1)"; \ LOCAL_TARBALL="$(ls /vendor/exchange*.tar.gz | head -1)"; \
echo "Using local Exchange tarball from ${LOCAL_TARBALL}"; \ echo "Using local Exchange tarball from ${LOCAL_TARBALL}"; \
@ -75,23 +76,26 @@ RUN set -e; \
cp "${LOCAL_TARBALL}" exchange.tar.gz; \ cp "${LOCAL_TARBALL}" exchange.tar.gz; \
tar xzf exchange.tar.gz; \ tar xzf exchange.tar.gz; \
EXCHANGE_DIR="$(ls -d exchange-* | head -1)"; \ EXCHANGE_DIR="$(ls -d exchange-* | head -1)"; \
EXCHANGE_TAR=1; \
elif [ -n "${EXCHANGE_TARBALL_URL}" ]; then \ elif [ -n "${EXCHANGE_TARBALL_URL}" ]; then \
echo "Fetching Exchange tarball ${EXCHANGE_TARBALL_URL}"; \ echo "Fetching Exchange tarball ${EXCHANGE_TARBALL_URL}"; \
mkdir -p /src && cd /src; \ mkdir -p /src && cd /src; \
curl -L "${EXCHANGE_TARBALL_URL}" -o exchange.tar.gz; \ curl -L "${EXCHANGE_TARBALL_URL}" -o exchange.tar.gz; \
tar xzf exchange.tar.gz; \ tar xzf exchange.tar.gz; \
EXCHANGE_DIR="$(ls -d exchange-* | head -1)"; \ EXCHANGE_DIR="$(ls -d exchange-* | head -1)"; \
EXCHANGE_TAR=1; \
else \ else \
git clone --depth 1 --branch "${EXCHANGE_REF}" https://git.taler.net/exchange.git /src/exchange; \ git clone --depth 1 --branch "${EXCHANGE_REF}" https://git.taler.net/exchange.git /src/exchange; \
EXCHANGE_DIR="/src/exchange"; \ EXCHANGE_DIR="/src/exchange"; \
fi; \ fi; \
if [ ! -d "${EXCHANGE_DIR}/.git" ]; then \ if [ "${EXCHANGE_TAR}" = "0" ]; then \
(cd "${EXCHANGE_DIR}" && git init >/dev/null 2>&1); \ cd "${EXCHANGE_DIR}" && env GNUNET_PREFIX=/usr ./bootstrap; \
else \
echo "Skipping bootstrap for Exchange tarball"; \
fi; \ fi; \
cd "${EXCHANGE_DIR}" && env GNUNET_PREFIX=/usr GIT_CONFIG_NOSYSTEM=1 GIT_DIR= GIT_WORK_TREE=. ./bootstrap && \ cd "${EXCHANGE_DIR}" && env GNUNET_PREFIX=/usr GIT_CONFIG_NOSYSTEM=1 GIT_DIR= GIT_WORK_TREE=. ./configure --prefix=/usr && make -j$(nproc) && make install; \
./configure --prefix=/usr && make -j$(nproc) && make install; \
# Merchant # Merchant
MERCHANT_DIR=""; \ MERCHANT_DIR=""; MERCHANT_TAR=0; \
if ls /vendor/merchant*.tar.gz >/dev/null 2>&1; then \ if ls /vendor/merchant*.tar.gz >/dev/null 2>&1; then \
LOCAL_TARBALL="$(ls /vendor/merchant*.tar.gz | head -1)"; \ LOCAL_TARBALL="$(ls /vendor/merchant*.tar.gz | head -1)"; \
echo "Using local Merchant tarball from ${LOCAL_TARBALL}"; \ echo "Using local Merchant tarball from ${LOCAL_TARBALL}"; \
@ -99,21 +103,24 @@ RUN set -e; \
cp "${LOCAL_TARBALL}" merchant.tar.gz; \ cp "${LOCAL_TARBALL}" merchant.tar.gz; \
tar xzf merchant.tar.gz; \ tar xzf merchant.tar.gz; \
MERCHANT_DIR="$(ls -d merchant-* | head -1)"; \ MERCHANT_DIR="$(ls -d merchant-* | head -1)"; \
MERCHANT_TAR=1; \
elif [ -n "${MERCHANT_TARBALL_URL}" ]; then \ elif [ -n "${MERCHANT_TARBALL_URL}" ]; then \
echo "Fetching Merchant tarball ${MERCHANT_TARBALL_URL}"; \ echo "Fetching Merchant tarball ${MERCHANT_TARBALL_URL}"; \
mkdir -p /src && cd /src; \ mkdir -p /src && cd /src; \
curl -L "${MERCHANT_TARBALL_URL}" -o merchant.tar.gz; \ curl -L "${MERCHANT_TARBALL_URL}" -o merchant.tar.gz; \
tar xzf merchant.tar.gz; \ tar xzf merchant.tar.gz; \
MERCHANT_DIR="$(ls -d merchant-* | head -1)"; \ MERCHANT_DIR="$(ls -d merchant-* | head -1)"; \
MERCHANT_TAR=1; \
else \ else \
git clone --depth 1 --branch "${MERCHANT_REF}" https://git.taler.net/merchant.git /src/merchant; \ git clone --depth 1 --branch "${MERCHANT_REF}" https://git.taler.net/merchant.git /src/merchant; \
MERCHANT_DIR="/src/merchant"; \ MERCHANT_DIR="/src/merchant"; \
fi; \ fi; \
if [ ! -d "${MERCHANT_DIR}/.git" ]; then \ if [ "${MERCHANT_TAR}" = "0" ]; then \
(cd "${MERCHANT_DIR}" && git init >/dev/null 2>&1); \ cd "${MERCHANT_DIR}" && env GNUNET_PREFIX=/usr ./bootstrap; \
else \
echo "Skipping bootstrap for Merchant tarball"; \
fi; \ fi; \
cd "${MERCHANT_DIR}" && env GNUNET_PREFIX=/usr GIT_CONFIG_NOSYSTEM=1 GIT_DIR= GIT_WORK_TREE=. ./bootstrap && \ cd "${MERCHANT_DIR}" && env GNUNET_PREFIX=/usr GIT_CONFIG_NOSYSTEM=1 GIT_DIR= GIT_WORK_TREE=. ./configure --prefix=/usr && make -j$(nproc) && make install
./configure --prefix=/usr && make -j$(nproc) && make install
# LibEuFin (Bank) # LibEuFin (Bank)
RUN set -e; \ RUN set -e; \