mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
ci: reduce build time (#3519)
This commit is contained in:
committed by
GitHub
parent
cd6e133c86
commit
25a98cda81
@ -11,7 +11,8 @@ cd ..\..\..\appflowy_flutter
|
||||
|
||||
REM Navigate to the appflowy_flutter directory and generate files
|
||||
echo Generating files for appflowy_flutter
|
||||
call flutter clean >nul 2>&1 && call flutter packages pub get >nul 2>&1 && call dart run build_runner clean && call dart run build_runner build -d
|
||||
REM call flutter packages pub get
|
||||
call dart run build_runner clean && call dart run build_runner build -d
|
||||
echo Done generating files for appflowy_flutter
|
||||
|
||||
echo Generating files for packages
|
||||
@ -24,7 +25,7 @@ for /D %%d in (*) do (
|
||||
if exist "pubspec.yaml" (
|
||||
echo Generating freezed files in %%d...
|
||||
echo Please wait while we clean the project and fetch the dependencies.
|
||||
call flutter clean >nul 2>&1 && call flutter packages pub get >nul 2>&1 && call dart run build_runner clean && call dart run build_runner build -d
|
||||
call dart run build_runner clean && call dart run build_runner build -d
|
||||
echo Done running build command in %%d
|
||||
) else (
|
||||
echo No pubspec.yaml found in %%d, it can't be a Dart project. Skipping.
|
||||
|
@ -1,5 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
no_pub_get=false
|
||||
|
||||
while getopts 's' flag; do
|
||||
case "${flag}" in
|
||||
s) no_pub_get=true ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Store the current working directory
|
||||
original_dir=$(pwd)
|
||||
|
||||
@ -10,9 +18,12 @@ cd ../../../appflowy_flutter
|
||||
|
||||
# Navigate to the appflowy_flutter directory and generate files
|
||||
echo "Generating files for appflowy_flutter"
|
||||
# flutter clean >/dev/null 2>&1 && flutter packages pub get >/dev/null 2>&1 && dart run build_runner clean &&
|
||||
flutter packages pub get >/dev/null 2>&1
|
||||
dart run build_runner build -d
|
||||
|
||||
if [ "$no_pub_get" = false ]; then
|
||||
flutter packages pub get >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
dart run build_runner clean && dart run build_runner build -d
|
||||
echo "Done generating files for appflowy_flutter"
|
||||
|
||||
echo "Generating files for packages"
|
||||
@ -25,8 +36,10 @@ for d in */; do
|
||||
if [ -f "pubspec.yaml" ]; then
|
||||
echo "Generating freezed files in $d..."
|
||||
echo "Please wait while we clean the project and fetch the dependencies."
|
||||
flutter packages pub get >/dev/null 2>&1
|
||||
dart run build_runner build -d
|
||||
if [ "$no_pub_get" = false ]; then
|
||||
flutter packages pub get >/dev/null 2>&1
|
||||
fi
|
||||
dart run build_runner clean && dart run build_runner build -d
|
||||
echo "Done running build command in $d"
|
||||
else
|
||||
echo "No pubspec.yaml found in $d, it can\'t be a Dart project. Skipping."
|
||||
|
Reference in New Issue
Block a user