Skip to content

Commit

Permalink
Fix flavors for windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
slightfoot committed Oct 2, 2020
1 parent df03c6f commit 1de6050
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
6 changes: 4 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'dart:math';

import 'package:args/args.dart';
import 'package:flutter_launcher_icons/utils.dart';
import 'package:path/path.dart' as path;
import 'package:yaml/yaml.dart';
import 'package:flutter_launcher_icons/android.dart' as android_launcher_icons;
import 'package:flutter_launcher_icons/ios.dart' as ios_launcher_icons;
Expand All @@ -12,14 +13,15 @@ import 'package:flutter_launcher_icons/custom_exceptions.dart';
const String fileOption = 'file';
const String helpFlag = 'help';
const String defaultConfigFile = 'flutter_launcher_icons.yaml';
const String flavorConfigFilePattern = '\./flutter_launcher_icons-(.*).yaml';
const String flavorConfigFilePattern = r'^flutter_launcher_icons-(.*).yaml$';
String flavorConfigFile(String flavor) => 'flutter_launcher_icons-$flavor.yaml';

List<String> getFlavors() {
List<String> flavors = [];
for (var item in Directory('.').listSync()) {
if (item is File) {
var match = RegExp(flavorConfigFilePattern).firstMatch(item.path);
final name = path.basename(item.path);
final match = RegExp(flavorConfigFilePattern).firstMatch(name);
if (match != null) {
flavors.add(match.group(1));
}
Expand Down
15 changes: 6 additions & 9 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
name: flutter_launcher_icons
description: A package which simplifies the task of updating your Flutter app's launcher icon.
version: 0.8.0
version: 0.8.1
maintainer: Mark O'Sullivan (@MarkOSullivan94)
homepage: https://github.com/fluttercommunity/flutter_launcher_icons
authors:
- Flutter Community <[email protected]>
- Franz Silva <[email protected]>
- Mark O'Sullivan <[email protected]>

dependencies:
image: "^2.1.1"
args: "^1.5.0"
yaml: "^2.1.15"
image: ^2.1.1
args: ^1.5.0
yaml: ^2.1.15
path: ^1.7.0

environment:
sdk: '>=2.3.0 <3.0.0'

dev_dependencies:
test: '^1.11.1'
test: ^1.11.1

0 comments on commit 1de6050

Please sign in to comment.