chain gateway build fix
Some checks failed
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/billing_fees Pipeline failed
ci/woodpecker/push/fx/1 Pipeline failed
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/fx/2 Pipeline failed

This commit is contained in:
Stephan D
2025-11-11 09:26:00 +01:00
parent 881ebaff5f
commit 4dfe6f8eac

View File

@@ -4,14 +4,16 @@ set -eu
echo "[fx-pipeline] rewriting .env.version" >&2 echo "[fx-pipeline] rewriting .env.version" >&2
if [ -f ./.env.version ]; then if [ -f ./.env.version ]; then
tmp_env="$(mktemp .env.version.sanitized.XXXXXX)" while IFS= read -r line || [ -n "$line" ]; do
if grep -E '^[[:alpha:]_][[:alnum:]_]*=' ./.env.version >"$tmp_env" 2>/dev/null; then case "$line" in
# shellcheck disable=SC1091 ''|\#*) continue ;;
. "$tmp_env" || true esac
else if printf '%s' "$line" | grep -Eq '^[[:alpha:]_][[:alnum:]_]*='; then
echo "[fx-pipeline] ignoring legacy .env.version contents" >&2 key="${line%%=*}"
fi value="${line#*=}"
rm -f "$tmp_env" export "$key=$value"
fi
done < ./.env.version
fi fi
if [ -n "${WOODPECKER_COMMIT:-}" ]; then if [ -n "${WOODPECKER_COMMIT:-}" ]; then