mirror of
				https://github.com/AppFlowy-IO/AppFlowy.git
				synced 2025-11-04 12:03:28 +00:00 
			
		
		
		
	
		
			
	
	
		
			39 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Batchfile
		
	
	
	
	
	
		
		
			
		
	
	
			39 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Batchfile
		
	
	
	
	
	
| 
								 | 
							
								@echo off
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								REM Store the current working directory
							 | 
						||
| 
								 | 
							
								set "original_dir=%CD%"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								REM Change the current working directory to the script's location
							 | 
						||
| 
								 | 
							
								cd /d "%~dp0"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								REM Navigate to the project root
							 | 
						||
| 
								 | 
							
								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
							 | 
						||
| 
								 | 
							
								echo Done generating files for appflowy_flutter
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								echo Generating files for packages
							 | 
						||
| 
								 | 
							
								cd packages
							 | 
						||
| 
								 | 
							
								for /D %%d in (*) do (
							 | 
						||
| 
								 | 
							
								    REM Navigate into the subdirectory
							 | 
						||
| 
								 | 
							
								    cd "%%d"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    REM Check if the subdirectory contains a pubspec.yaml file
							 | 
						||
| 
								 | 
							
								    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
							 | 
						||
| 
								 | 
							
								        echo Done running build command in %%d
							 | 
						||
| 
								 | 
							
								    ) else (
							 | 
						||
| 
								 | 
							
								        echo No pubspec.yaml found in %%d, it can't be a Dart project. Skipping.
							 | 
						||
| 
								 | 
							
								    )
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    REM Navigate back to the packages directory
							 | 
						||
| 
								 | 
							
								    cd ..
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								REM Return to the original directory
							 | 
						||
| 
								 | 
							
								cd /d "%original_dir%"
							 |