Skip to content

Commit d1a735e

Browse files
committed
test
1 parent 53dbf92 commit d1a735e

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@ jobs:
119119
run: |
120120
mkdir C:\workspace\flutter
121121
cd C:\workspace\flutter
122-
git config --global core.autocrlf true
122+
# git config --global core.autocrlf true
123+
124+
git config --global core.autocrlf false
125+
git config --global core.filemode false
126+
git config --global core.fscache true
127+
git config --global core.preloadindex true
128+
git config --global depot-tools.allowGlobalGitConfig true
123129
git init --quiet
124130
git remote add origin https://github.com/${{ github.repository }}
125131
git fetch --depth 1 origin ${{ github.sha }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
diff --git a/tools/generate_package_config.dart b/tools/generate_package_config.dart
2+
index 01a7a0e9469..d24470e6824 100644
3+
--- a/tools/generate_package_config.dart
4+
+++ b/tools/generate_package_config.dart
5+
@@ -102,12 +102,11 @@ $overrides
6+
String currentSDKVersion() {
7+
final versionContents =
8+
File.fromUri(repoRoot.resolve('tools/VERSION')).readAsStringSync();
9+
- final lines = versionContents
10+
- .split('\n')
11+
- .where((line) => !line.startsWith('#') && line.isNotEmpty);
12+
- final versionParts = Map.fromEntries(lines.map((line) {
13+
- final parts = line.split(' ');
14+
- return MapEntry(parts[0], parts[1]);
15+
- }));
16+
+ final lines = LineSplitter.split(versionContents);
17+
+ final versionParts = {
18+
+ for (var line in lines)
19+
+ if (line.isNotEmpty && !line.startsWith('#'))
20+
+ if (line.split(' ') case [final key, final value]) key: value
21+
+ };
22+
return '${versionParts['MAJOR']}.${versionParts['MINOR']}.${versionParts['PATCH']}';
23+
}

0 commit comments

Comments
 (0)