Skip to content

Commit 492e355

Browse files
authored
Remove use of site-shared as a git submodule (#12494)
Simplifies site contribution setup and slightly reduces CI workflow times. We temporarily need to vendor the inject_dartpad script but that will go away in the future once we use it as a library from Jaspr code. Helps prepare for #12405
1 parent 28a2008 commit 492e355

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+2793
-146
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ updates:
2121
- "auto.dependencies"
2222
- "auto.npm"
2323
- "lang.javascript"
24-
# Automatically update submodules
25-
- package-ecosystem: 'gitsubmodule'
26-
directory: '/'
27-
schedule:
28-
interval: 'daily'
29-
labels:
30-
- "auto.dependencies"
31-
- "auto.submodules"
3224
- package-ecosystem: "pub"
3325
versioning-strategy: "increase-if-necessary"
3426
directories:

.github/workflows/test.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434
continue-on-error: ${{ matrix.experimental }}
3535
steps:
3636
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
37-
with:
38-
submodules: recursive
3937
- uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046
4038
with:
4139
channel: ${{ matrix.branch }}
@@ -58,8 +56,6 @@ jobs:
5856
if: github.repository == 'flutter/website'
5957
steps:
6058
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
61-
with:
62-
submodules: recursive
6359
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
6460
with:
6561
sdk: beta
@@ -74,8 +70,6 @@ jobs:
7470
runs-on: ubuntu-latest
7571
steps:
7672
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
77-
with:
78-
submodules: recursive
7973
- name: Enable Corepack
8074
run: npm i -g corepack@latest && corepack enable
8175
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
@@ -104,8 +98,6 @@ jobs:
10498
if: github.repository == 'flutter/website'
10599
steps:
106100
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
107-
with:
108-
submodules: recursive
109101
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
110102
with:
111103
sdk: beta

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ package-lock.json
2222
pubspec.lock
2323
tmp/
2424

25-
# Temporary as codelabs used to be a submodule
26-
examples/codelabs
25+
# Temporary as site-shared used to be a submodule.
26+
site-shared/

.gitmodules

Lines changed: 0 additions & 4 deletions
This file was deleted.

.idx/dev.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
workspace = {
3939
# Runs when a workspace is first created
4040
onCreate = {
41-
get-submodule = "git submodule update --init --recursive";
4241
pnpm-install = "pnpm install";
4342
};
4443
# Runs when the workspace is (re)started

README.md

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ you probably don't need to build this site.
7575
Often you can make changes using the GitHub UI.
7676
If needed, we can stage the changes automatically in your pull request.
7777

78-
> [!IMPORTANT]
79-
> If you are cloning this repository locally,
80-
> follow the below instruction on cloning with its submodule.
81-
8278
If your change involves code samples, adds/removes pages, or affects navigation,
8379
do consider building and testing your work before submitting.
8480

@@ -133,52 +129,28 @@ follow the update instructions for how you originally installed it.
133129
[Node.js download archive]: https://nodejs.org/en/download/
134130
[nvm]: https://github.com/nvm-sh/nvm
135131

136-
### Clone this repo and its submodules
137-
138-
> [!NOTE]
139-
> This repository has git _submodules_, which affects how you clone it.
140-
> The GitHub documentation has general help on
141-
> [forking][] and [cloning][] repos.
132+
### Clone this repo
142133

143134
If you're not a member of the Flutter organization,
144-
we recommend you **create a fork** of this repo under your own account,
135+
we recommend you [create a fork][] of this repo under your own account,
145136
and then submit a PR from that fork.
146137

147138
Once you have a fork (or you're a Flutter org member),
148-
_choose one_ of the following submodule-cloning techniques:
149-
150-
1. Clone the repo and its submodule at the same time
151-
using the `--recurse-submodules` option:
152-
153-
```console
154-
git clone --recurse-submodules https://github.com/flutter/website.git
155-
```
139+
clone the repository with `git clone`:
156140

157-
2. If you've already cloned the repo without its submodule,
158-
then run this command from the root of the repository:
159-
160-
```console
161-
git submodule update --init --recursive
162-
```
163-
164-
> [!NOTE]
165-
> At any time during development
166-
> you can use the `git submodule` command to refresh submodules:
167-
>
168-
> ```console
169-
> git pull && git submodule update --init --recursive
170-
> ```
141+
```bash
142+
git clone https://github.com/flutter/website.git
143+
```
171144

172-
[cloning]: https://docs.github.com/repositories/creating-and-managing-repositories/cloning-a-repository
173-
[forking]: https://docs.github.com/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo
145+
[create a fork]: https://docs.github.com/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo
174146

175147
## Set up your local environment and serve changes
176148

177149
Before you continue setting up the site infrastructure,
178150
verify the correct versions of Flutter and Node.js are set up and available by
179151
following the instructions in [Get the prerequisites](#get-the-prerequisites).
180152

181-
1. _Optional:_ After cloning the repo and its submodules,
153+
1. _Optional:_ After cloning the repo,
182154
create a branch for your changes:
183155

184156
```console

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
analyzer:
2-
exclude: [_site, flutter, site-shared, src, tmp]
2+
exclude: [_site, flutter, src, tmp]

cloud_build/deploy.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
steps:
2-
- name: gcr.io/cloud-builders/git
3-
args: ['submodule', 'update', '--init', '--recursive']
42
- name: gcr.io/cloud-builders/git
53
args: ['fetch', '--unshallow']
64
- name: gcr.io/flutter-dev-230821/firebase-ghcli

cloud_build/stage.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
steps:
2-
- name: gcr.io/cloud-builders/git
3-
args: ['submodule', 'update', '--init', '--recursive']
42
- name: gcr.io/flutter-dev-230821/firebase-ghcli
5-
# Set up, build, deploy site to staging, then comment link on PR
3+
# Build the site, deploy it to staging, then comment the link on the PR.
64
entrypoint: '/bin/bash'
75
args:
86
- '-c'

0 commit comments

Comments
 (0)