Skip to content

Commit

Permalink
fix: flutter web build (#292)
Browse files Browse the repository at this point in the history
* Update Earthfile

* Update Earthfile

* Update Earthfile

* Update Earthfile

* Update Earthfile
  • Loading branch information
minikin authored Aug 30, 2024
1 parent 9db7b7f commit 9c9c3c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions earthly/flutter/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down
3 changes: 2 additions & 1 deletion examples/flutter/example/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9c9c3c1

Please sign in to comment.