#!/bin/bash

# Configure PHP Sentry DSN
if [ -n "$WP_SENTRY_DSN" ]; then
    wp config set WP_SENTRY_DSN $WP_SENTRY_DSN --add --type=constant
fi

# Configure JS Sentry DSN
if [ -n "$WP_SENTRY_PUBLIC_DSN" ]; then
    wp config set WP_SENTRY_PUBLIC_DSN $WP_SENTRY_PUBLIC_DSN --add --type=constant
fi

# Configure Sentry Application Environment DSN
if [ -n "$WP_SENTRY_ENV" ]; then
    wp config set WP_SENTRY_ENV $WP_SENTRY_ENV --add --type=constant
fi

# Configure  Sentry Application Version DSN
if [ -n "$WP_SENTRY_VERSION" ]; then 
    wp config set WP_SENTRY_VERSION $WP_SENTRY_VERSION --add --type=constant
fi

