Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔥 Remove flutter as a submodule #9307

Merged
merged 11 commits into from
Sep 16, 2023
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ CONTRIBUTING.md
docker-compose.yml
LICENSE
node_modules/
README.md
README.md
flutter/
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@

# Allow dart files in examples/ to be detectable
examples/**/*.dart -linguist-documentation

# Handles files and normalization
* text=auto
*.sh text eol=lf
*.bat text eol=crlf
*.dart text eol=lf
dart text eol=lf
flutter text eol=lf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ _site
*.swp
build
node_modules
flutter/

# Dart and Flutter, build related
.dart_tool
Expand Down
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:/dart-lang/site-shared
branch = main
[submodule "flutter"]
path = flutter
url = https:/flutter/flutter
branch = stable
[submodule "examples/codelabs"]
path = examples/codelabs
url = https:/flutter/codelabs
17 changes: 2 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,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:/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
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,8 @@ Install the following tools, if you don't have them already:
> The GitHub documentation has general help on
> [forking][] and [cloning][] repos.

If you are working in the Windows desktop environment,
make sure you have Git `autocrlf` set to `input`
**before** initializing the submodules.
This ensures that line endings are handled correctly
_before_ any Bash scripts are executed within the submodules.
See [issue 6201][] for details.

[cloning]: https://help.github.com/articles/cloning-a-repository
[forking]: https://docs.github.com/en/get-started/quickstart/fork-a-repo
[issue 6201]: https:/flutter/website/issues/6201

If you're outside of the Flutter organization,
we recommend you **create a fork** of the repo under your own account,
Expand All @@ -127,7 +119,7 @@ _choose one_ of the following submodule-cloning techniques:
```

OR

- If you've already cloned the repo without its submodule,
then run this command from the repo root:<br>
```bash
Expand All @@ -148,7 +140,7 @@ _choose one_ of the following submodule-cloning techniques:
```bash
$ git checkout -b <BRANCH_NAME>
```

1. If the Docker Desktop application isn't already running,
start it. Look at its status icon:
if it has an exclamation point (`!`),
Expand Down Expand Up @@ -196,7 +188,7 @@ _choose one_ of the following submodule-cloning techniques:
```bash
$ make down
```

> **Tip:** To find additional commands, read the [`Makefile`][].
> For example, if you need to debug the Docker infrastructure,
> you can run `make debug`.
Expand Down
1 change: 0 additions & 1 deletion flutter
Submodule flutter deleted from 367f9e
Loading