v2.18.2 (#857)
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:
parent
ed5b7192e6
commit
d50704e694
110 changed files with 1663 additions and 764 deletions
25
scripts/ci/inject-sentry-dsn.sh
Executable file
25
scripts/ci/inject-sentry-dsn.sh
Executable 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}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue