ci: no more sed

Fix "Bad state: Unable to generate package graph"
This commit is contained in:
Hieu 2022-02-23 22:02:46 +07:00
parent 6e1c6d7a47
commit 288afbe68b
3 changed files with 10 additions and 26 deletions

View File

@ -35,8 +35,7 @@ jobs:
working-directory: frontend/app_flowy
run: |
flutter pub run easy_localization:generate -S ./assets/translations -f keys -O lib/generated -o locale_keys.g.dart
sed -i '/generate: true/s/true/false/g' pubspec.yaml
flutter pub get
flutter packages pub get
flutter packages pub run build_runner build --delete-conflicting-outputs
- name: flutter analyze
working-directory: frontend/app_flowy

View File

@ -35,8 +35,7 @@ jobs:
working-directory: frontend/app_flowy
run: |
flutter pub run easy_localization:generate -S ./assets/translations -f keys -O lib/generated -o locale_keys.g.dart
sed -i '/generate: true/s/true/false/g' pubspec.yaml
flutter pub get
flutter packages pub get
flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Build FlowySDK
working-directory: frontend

View File

@ -187,33 +187,19 @@ script = [
"""
cd app_flowy
flutter clean
sed -i '/generate: true/s/true/false/g' pubspec.yaml
flutter pub get
flutter packages pub get
flutter packages pub run build_runner build --delete-conflicting-outputs
"""
]
# TODO: Add support for Windows.
# [tasks.generate_freezed_files.windows]
# script_runner = "@duckscript"
# script = [
# """
# cd ./app_flowy/
# exec cmd.exe /c flutter clean
# exec cmd.exe /c flutter pub get
# exec cmd.exe /c flutter pub run easy_localization:generate -S assets/translations/
# exec cmd.exe /c flutter pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations
# """
# ]
[tasks.generate_freezed_files.mac]
script_runner = "@shell"
[tasks.generate_freezed_files.windows]
script_runner = "@duckscript"
script = [
"""
cd app_flowy
flutter clean
sed -i '' '/generate: true/s/true/false/g' pubspec.yaml
flutter pub get
flutter packages pub run build_runner build --delete-conflicting-outputs
cd ./app_flowy/
exec cmd.exe /c flutter clean
exec cmd.exe /c flutter packages pub get
exec cmd.exe /c flutter packages pub get
exec cmd.exe /c flutter packages pub run build_runner build --delete-conflicting-outputs
"""
]