From 9c9c3c182ccb5f1cba7f2343aff962441194ec55 Mon Sep 17 00:00:00 2001 From: Oleksandr Prokhorenko Date: Fri, 30 Aug 2024 15:45:35 +0200 Subject: [PATCH] fix: flutter web build (#292) * Update Earthfile * Update Earthfile * Update Earthfile * Update Earthfile * Update Earthfile --- earthly/flutter/Earthfile | 8 +++++--- examples/flutter/example/Earthfile | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/earthly/flutter/Earthfile b/earthly/flutter/Earthfile index 54974d412..7079780a5 100644 --- a/earthly/flutter/Earthfile +++ b/earthly/flutter/Earthfile @@ -162,14 +162,16 @@ UNIT_TESTS: BUILD_WEB: FUNCTION - ARG WORKDIR - ARG SAVE_LOCALLY=false ARG --required TARGET + ARG BUILD_MODE='--release' + ARG SAVE_LOCALLY=false + ARG SENTRY_DSN + ARG WORKDIR WORKDIR $WORKDIR RUN flutter clean RUN flutter pub get - RUN flutter build web --web-renderer canvaskit --release --target $TARGET + RUN flutter build web --web-renderer canvaskit $BUILD_MODE --target $TARGET --dart-define SENTRY_DSN=$SENTRY_DSN WORKDIR "$WORKDIR/build" IF [ $SAVE_LOCALLY = true ] diff --git a/examples/flutter/example/Earthfile b/examples/flutter/example/Earthfile index e42dd63de..d247b4fb2 100644 --- a/examples/flutter/example/Earthfile +++ b/examples/flutter/example/Earthfile @@ -36,8 +36,9 @@ build-web: ARG WORKDIR=/frontend ARG --required TARGET + ARG --required SENTRY_DSN - DO flutter-ci+BUILD_WEB --WORKDIR=$WORKDIR --TARGET=$TARGET + DO flutter-ci+BUILD_WEB --WORKDIR=$WORKDIR --TARGET=$TARGET --SENTRY_DSN=$SENTRY_DSN # Check the licenses of the Flutter dependencies. check-license: