From 4829ad36de3c9b0c6cd7c1d030ee2987d7bb7347 Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Wed, 29 Nov 2023 15:11:59 +0100 Subject: [PATCH] fix(example): web obfuscation not working (#1766) --- flutter/example/run.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flutter/example/run.sh b/flutter/example/run.sh index d40bc89df2..025a6f31b4 100755 --- a/flutter/example/run.sh +++ b/flutter/example/run.sh @@ -6,7 +6,10 @@ set -euo pipefail # Or try out the Alpha version of the Sentry Dart Plugin that does it automatically for you, feedback is welcomed. # https://github.com/getsentry/sentry-dart-plugin -export SENTRY_RELEASE=$(date +%Y-%m-%d_%H-%M-%S) +VERSION=$(grep '^version:' pubspec.yaml | awk '{print $2}') +CURRENT_DATE=$(date +%Y-%m-%d_%H-%M-%S) + +export SENTRY_RELEASE="$CURRENT_DATE"@"$VERSION" echo -e "[\033[92mrun\033[0m] $1" @@ -23,7 +26,7 @@ elif [ "$1" == "android" ]; then launchCmd='adb shell am start -n io.sentry.samples.flutter/io.sentry.samples.flutter.MainActivity' echo -e "[\033[92mrun\033[0m] Android app installed" elif [ "$1" == "web" ]; then - flutter build web --dart-define=SENTRY_RELEASE=$SENTRY_RELEASE --source-maps + flutter build web --dart-define=SENTRY_RELEASE="$SENTRY_RELEASE" --source-maps buildDir='./build/web/' port='8132' ls -lah $buildDir