mkFlutterApp: support apps which don't produce a .packages
This commit is contained in:
parent
8647d1d515
commit
8a4ef88653
|
@ -88,7 +88,8 @@ let
|
|||
# so we can use lock, diff yaml
|
||||
cp "pubspec.yaml" "$RES"
|
||||
cp "pubspec.lock" "$RES"
|
||||
mv .dart_tool .flutter-plugins .flutter-plugins-dependencies .packages "$RES/f"
|
||||
[[ -e .packages ]] && mv .packages "$RES/f"
|
||||
mv .dart_tool .flutter-plugins .flutter-plugins-dependencies "$RES/f"
|
||||
|
||||
# replace paths with placeholders
|
||||
find "$RES" -type f -exec sed -i \
|
||||
|
@ -119,7 +120,7 @@ let
|
|||
find "$RES/.pub-cache" -iname "*.json" -exec sed -r 's|.*_fetchedAt.*| "_fetchedAt": "'"$DART_DATE"'",|g' -i {} +
|
||||
replace_line_matching "$RES/f/.dart_tool/package_config.json" '"generated"' '"generated": "'"$DART_DATE"'",'
|
||||
replace_line_matching "$RES/f/.flutter-plugins-dependencies" '"date_created"' '"date_created": "'"$DART_DATE"'",'
|
||||
remove_line_matching "$RES/f/.packages" "Generated by pub"
|
||||
[[ -e "$RES/f/.packages" ]] && remove_line_matching "$RES/f/.packages" "Generated by pub"
|
||||
|
||||
# nuke refs
|
||||
find "$RES" -type f -exec nuke-refs {} +
|
||||
|
|
Loading…
Reference in a new issue