Skip to content

Commit

Permalink
💚 ++
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Nov 7, 2023
1 parent 189fef3 commit b9bdc64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,9 @@ jobs:
- name: Patching files for Flutter ${{ matrix.sdk }}
run: dart ./scripts/files_patch.dart
- name: Check satisfied packages
run: |
dart ./scripts/melos_packages.dart
MELOS_IGNORE_PACKAGES=$(cat .melos_ignore_packages)
echo $MELOS_IGNORE_PACKAGES
run: dart ./scripts/melos_packages.dart
- name: Bootstrap
run: |
echo $MELOS_IGNORE_PACKAGES
melos bootstrap $(eval echo $MELOS_IGNORE_PACKAGES)
run: melos bootstrap $(eval cat .melos_ignore_packages)
- name: Format
run: melos exec $(eval cat .melos_ignore_packages) -- "dart format --set-exit-if-changed ."
- name: Analyze Dart packages
Expand Down
18 changes: 7 additions & 11 deletions scripts/melos_packages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,13 @@ void main() async {
final current = Version.parse(
RegExp(r'\d*\.\d*\.\d*').firstMatch(Platform.version)!.group(0)!,
);
final satisfiedPackages = <String>[], ignoredPackages = <String>[];
for (final package in packages) {
if (package.pubSpec.environment!.sdkConstraint!.allows(current)) {
satisfiedPackages.add(package.name);
} else {
ignoredPackages.add(package.name);
}
}
File('$root/.melos_packages').writeAsStringSync(
satisfiedPackages.join(','),
);
final ignoredPackages = packages
.map(
(package) => package.pubSpec.environment!.sdkConstraint!.allows(current)
? null
: package.name,
)
.whereType<String>();
File('$root/.melos_ignore_packages').writeAsStringSync(
ignoredPackages.map((e) => '--ignore="$e"').join(' '),
);
Expand Down

0 comments on commit b9bdc64

Please sign in to comment.