Skip to content

Commit a18eb17

Browse files
authored
Merge branch 'main' into feat/filter-optimization
2 parents 904cbc3 + 0a1791f commit a18eb17

29 files changed

Lines changed: 1526 additions & 1583 deletions

File tree

.github/workflows/bump_templates.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,13 @@ jobs:
2222
- name: Bump templates
2323
run: tool/generate_bundles.sh
2424

25-
- name: Config Git User
26-
run: |
27-
git config user.name VGV Bot
28-
git config user.email vgvbot@users.noreply.github.com
29-
3025
- name: Create Pull Request
3126
uses: peter-evans/create-pull-request@v7.0.8
3227
with:
28+
token: ${{ secrets.VGV_BOT_PAT }}
3329
base: main
3430
branch: feat/bump-template-bundles
3531
commit-message: "feat: bump template bundles"
3632
title: "feat: bump template bundles"
3733
body: Please squash and merge me!
3834
labels: bot
39-
author: VGV Bot <vgvbot@users.noreply.github.com>
40-
assignees: vgvbot
41-
committer: VGV Bot <vgvbot@users.noreply.github.com>

.github/workflows/site.yaml

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: ⚙️ Setup Node
2828
uses: actions/setup-node@v5
2929
with:
30-
node-version: 18.x
30+
node-version: 20.x
3131
cache: npm
3232
cache-dependency-path: site/package-lock.json
3333

@@ -42,45 +42,3 @@ jobs:
4242

4343
- name: 👷 Build website
4444
run: npm run build
45-
46-
deploy:
47-
needs: build
48-
49-
runs-on: ubuntu-latest
50-
51-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
52-
53-
defaults:
54-
run:
55-
working-directory: site
56-
57-
steps:
58-
- name: 📚 Git Checkout
59-
uses: actions/checkout@v5
60-
61-
- name: ⚙️ Setup Node
62-
uses: actions/setup-node@v5
63-
with:
64-
node-version: 18.x
65-
cache: npm
66-
cache-dependency-path: site/package-lock.json
67-
68-
- name: 📦 Install Dependencies
69-
run: npm ci
70-
71-
- name: ✨ Check Format
72-
run: npm run format:check
73-
74-
- name: 🧹 Lint
75-
run: npm run lint
76-
77-
- name: 👷 Build website
78-
run: npm run build
79-
80-
- name: ☁️ Deploy to GitHub Pages
81-
uses: peaceiris/actions-gh-pages@v4
82-
with:
83-
github_token: ${{ secrets.GITHUB_TOKEN }}
84-
publish_dir: ./site/build
85-
user_name: github-actions[bot]
86-
user_email: 41898282+github-actions[bot]@users.noreply.github.com

.github/workflows/site_deploy.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: site_deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+*"
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
defaults:
14+
run:
15+
working-directory: site
16+
17+
steps:
18+
- name: 📚 Git Checkout
19+
uses: actions/checkout@v5
20+
21+
- name: ⚙️ Setup Node
22+
uses: actions/setup-node@v5
23+
with:
24+
node-version: 18.x
25+
cache: npm
26+
cache-dependency-path: site/package-lock.json
27+
28+
- name: 📦 Install Dependencies
29+
run: npm ci
30+
31+
- name: ✨ Check Format
32+
run: npm run format:check
33+
34+
- name: 🧹 Lint
35+
run: npm run lint
36+
37+
- name: 👷 Build website
38+
run: npm run build
39+
40+
- name: ☁️ Deploy to GitHub Pages
41+
uses: peaceiris/actions-gh-pages@v4
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
publish_dir: ./site/build
45+
user_name: github-actions[bot]
46+
user_email: 41898282+github-actions[bot]@users.noreply.github.com

.github/workflows/spdx_license_bot.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ jobs:
3737
id: make
3838
run: if [[ $(mason make spdx_license -q --licenses "[]" -o test --on-conflict overwrite --set-exit-if-changed) =~ "0 files changed" ]]; then echo "did_change=false"; else echo "did_change=true"; fi >> $GITHUB_ENV
3939

40-
- name: 🔑 Config Git User
41-
if: ${{ env.did_change == 'true' }}
42-
run: |
43-
git config user.name VGV Bot
44-
git config user.email vgvbot@users.noreply.github.com
45-
4640
- name: 🧱 Mason Make (lib/pub_license/spdx_license)
4741
if: ${{ env.did_change == 'true' }}
4842
run: |
@@ -55,12 +49,10 @@ jobs:
5549
if: ${{ env.did_change == 'true' }}
5650
uses: peter-evans/create-pull-request@v7.0.8
5751
with:
52+
token: ${{ secrets.VGV_BOT_PAT }}
5853
base: main
5954
branch: chore/update-spdx-license
6055
commit-message: "chore: update SPDX licenses"
6156
title: "chore: update SPDX licenses"
6257
body: Please squash and merge me!
6358
labels: bot
64-
author: VGV Bot <vgvbot@users.noreply.github.com>
65-
assignees: vgvbot
66-
committer: VGV Bot <vgvbot@users.noreply.github.com>

e2e/test/commands/create/flame_game/flame_game_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void main() {
5151
['coverage/lcov.info', '-o', 'coverage'],
5252
workingDirectory: workingDirectory,
5353
);
54-
expect(testCoverageResult.stdout, contains('lines......: 97.8%'));
54+
expect(testCoverageResult.stdout, matches(RegExp('lines(.+) 100.0%')));
5555
}),
5656
);
5757
}

lib/src/commands/create/commands/flame_game.dart

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,23 @@ class CreateFlameGame extends CreateSubCommand with OrgName {
1010
required super.logger,
1111
required super.generatorFromBundle,
1212
required super.generatorFromBrick,
13-
});
13+
}) {
14+
argParser.addMultiOption(
15+
'platforms',
16+
help:
17+
'The platforms supported by the game. By default, all platforms '
18+
'are enabled. Example: --platforms=android,ios',
19+
defaultsTo: ['android', 'ios', 'web', 'macos', 'windows'],
20+
allowed: ['android', 'ios', 'web', 'macos', 'windows'],
21+
allowedHelp: {
22+
'android': 'The game supports the Android platform.',
23+
'ios': 'The game supports the iOS platform.',
24+
'web': 'The game supports the Web platform.',
25+
'macos': 'The game supports the macOS platform.',
26+
'windows': 'The game supports the Windows platform.',
27+
},
28+
);
29+
}
1430

1531
@override
1632
String get name => 'flame_game';
@@ -20,4 +36,15 @@ class CreateFlameGame extends CreateSubCommand with OrgName {
2036

2137
@override
2238
Template get template => VeryGoodFlameGameTemplate();
39+
40+
@override
41+
Map<String, dynamic> getTemplateVars() {
42+
final vars = super.getTemplateVars();
43+
44+
final platforms = argResults['platforms'] as List<String>;
45+
46+
vars['platforms'] = platforms;
47+
48+
return vars;
49+
}
2350
}

0 commit comments

Comments
 (0)