Skip to content

Commit 4829ad3

Browse files
authored
fix(example): web obfuscation not working (#1766)
1 parent 3f3ef0b commit 4829ad3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

flutter/example/run.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ set -euo pipefail
66
# Or try out the Alpha version of the Sentry Dart Plugin that does it automatically for you, feedback is welcomed.
77
# https://github.com/getsentry/sentry-dart-plugin
88

9-
export SENTRY_RELEASE=$(date +%Y-%m-%d_%H-%M-%S)
9+
VERSION=$(grep '^version:' pubspec.yaml | awk '{print $2}')
10+
CURRENT_DATE=$(date +%Y-%m-%d_%H-%M-%S)
11+
12+
export SENTRY_RELEASE="$CURRENT_DATE"@"$VERSION"
1013

1114
echo -e "[\033[92mrun\033[0m] $1"
1215

@@ -23,7 +26,7 @@ elif [ "$1" == "android" ]; then
2326
launchCmd='adb shell am start -n io.sentry.samples.flutter/io.sentry.samples.flutter.MainActivity'
2427
echo -e "[\033[92mrun\033[0m] Android app installed"
2528
elif [ "$1" == "web" ]; then
26-
flutter build web --dart-define=SENTRY_RELEASE=$SENTRY_RELEASE --source-maps
29+
flutter build web --dart-define=SENTRY_RELEASE="$SENTRY_RELEASE" --source-maps
2730
buildDir='./build/web/'
2831
port='8132'
2932
ls -lah $buildDir

0 commit comments

Comments
 (0)