Skip to content

Commit

Permalink
🔥 Remove flutter as a submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Aug 26, 2023
1 parent 45f9578 commit dc23e15
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
path = site-shared
url = https://github.com/dart-lang/site-shared
branch = main
[submodule "flutter"]
path = flutter
url = https://github.com/flutter/flutter
branch = stable
[submodule "examples/codelabs"]
path = examples/codelabs
url = https://github.com/flutter/codelabs
17 changes: 2 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,16 @@ WORKDIR /app
# or run `git submodule update --init --recursive` after cloning.
FROM base AS flutter

# This Flutter install uses/requires the local ./flutter submodule
COPY ./flutter ./flutter
COPY ./site-shared ./site-shared
COPY pubspec.yaml ./

ARG FLUTTER_BUILD_BRANCH
ARG FLUTTER_BUILD_BRANCH=stable
ENV FLUTTER_BUILD_BRANCH=$FLUTTER_BUILD_BRANCH
ENV FLUTTER_ROOT=flutter
ENV FLUTTER_BIN=flutter/bin
ENV PATH="/app/flutter/bin:$PATH"

# Used if wanting to build the container with a different branch, this
# would change the current branch of and update the mirrored submodule
# e.g. `make build FLUTTER_BUILD_BRANCH=beta`
# This is not to be confused with the $FLUTTER_TEST_BRANCH
RUN if test -n "$FLUTTER_BUILD_BRANCH" -a "$FLUTTER_BUILD_BRANCH" != "stable" ; then \
cd flutter && \
git fetch && \
git remote set-branches origin "$FLUTTER_BUILD_BRANCH" && \
git fetch --depth 1 origin "$FLUTTER_BUILD_BRANCH" && \
git checkout "$FLUTTER_BUILD_BRANCH" -- && \
git pull; \
fi
RUN git clone --branch $FLUTTER_BUILD_BRANCH --single-branch https://github.com/flutter/flutter ./flutter

# Set up Flutter
# NOTE You will get a warning "Woah! You appear to be trying to run flutter as root."
Expand Down
1 change: 0 additions & 1 deletion flutter
Submodule flutter deleted from e1e472

0 comments on commit dc23e15

Please sign in to comment.