Co-authored-by: Cyprien <courtot.c@gmail.com>
Co-authored-by: Guillaume LE GOFF <guillaume.lgf@gmail.com>
Co-authored-by: Laure Hugo <201583486+laure0303@users.noreply.github.com>
Co-authored-by: Paul VEZIA <166131032+le-codeur-rapide@users.noreply.github.com>
Co-authored-by: Peter Evers <peter.evers@mistral.ai>
Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai>
Co-authored-by: Yousria <yousria.debaud@mistral.ai>
Co-authored-by: renovate-mistral[bot] <253709520+renovate-mistral[bot]@users.noreply.github.com>
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Mathias Gesbert 2026-06-29 17:35:54 +02:00 committed by GitHub
parent ed5b7192e6
commit d50704e694
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
110 changed files with 1663 additions and 764 deletions

25
scripts/ci/inject-sentry-dsn.sh Executable file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -euo pipefail
target_file="${1:-vibe/core/sentry.py}"
require_sentry_dsn="${REQUIRE_SENTRY_DSN:-false}"
if [ -z "${SENTRY_DSN:-}" ]; then
if [ "${require_sentry_dsn}" = "true" ]; then
echo "SENTRY_DSN is required but not set" >&2
exit 1
fi
echo "SENTRY_DSN is not set; leaving ${target_file} unchanged"
exit 0
fi
if ! grep -q '^_SENTRY_DSN = None$' "${target_file}"; then
echo "Expected Sentry placeholder not found in ${target_file}" >&2
exit 1
fi
escaped_dsn="$(printf '%s' "${SENTRY_DSN}" | sed 's/[&|]/\\&/g')"
sed -i.bak "s|^_SENTRY_DSN = None$|_SENTRY_DSN = \"${escaped_dsn}\"|" "${target_file}"
rm -f "${target_file}.bak"
grep -q '^_SENTRY_DSN = ".*"$' "${target_file}"