Files
zeekay d650dd60f0 refactor(rebrand): langflow->flow across docs, starter-project data, CI, tests
Docs corpus (Langflow->Hanzo Flow, upstream URLs langflow-ai/langflow->hanzoai/
flow, docs.langflow.org->docs.hanzo.ai), starter-project template help-URLs, CI
workflows, and test files. Remaining 'langflow' repo-wide is now dominated by
LANGFLOW_* env-var names + langflow_ settings fields — the config-boundary layer
deliberately preserved pending a coordinated FLOW_/HANZO_ alias-with-fallback
(renaming them blind breaks every deployment).
2026-07-16 10:00:51 -07:00

104 lines
2.5 KiB
Batchfile

@echo off
echo Starting Hanzo Flow build and run process...
REM Check if .env file exists and set env file flag
set "USE_ENV_FILE="
REM Get the script directory and resolve project root
for %%I in ("%~dp0..\..") do set "PROJECT_ROOT=%%~fI"
set "ENV_PATH=%PROJECT_ROOT%\.env"
if exist "%ENV_PATH%" (
echo Found .env file at: %ENV_PATH%
set "USE_ENV_FILE=1"
) else (
echo .env file not found at: %ENV_PATH%
echo Hanzo Flow will use default configuration
)
echo.
echo Step 1: Installing frontend dependencies...
cd ..\..\src\frontend
if errorlevel 1 (
echo Error: Could not navigate to src\frontend directory
pause
exit /b 1
)
echo Running npm install...
call npm install
if errorlevel 1 (
echo Error: npm install failed
pause
exit /b 1
)
echo.
echo Step 2: Building frontend...
echo Running npm run build...
call npm run build
if errorlevel 1 (
echo Error: npm run build failed
pause
exit /b 1
)
echo.
echo Step 3: Copying build files to backend...
cd ..\..
REM Check if build directory exists
if not exist "src\frontend\build" (
if not exist "src\frontend\dist" (
echo Error: Neither build nor dist directory found in src\frontend
pause
exit /b 1
)
set BUILD_DIR=src\frontend\dist
) else (
set BUILD_DIR=src\frontend\build
)
echo Copying from %BUILD_DIR% to src\backend\base\flow\frontend\
REM Create target directory if it doesn't exist
if not exist "src\backend\base\flow\frontend" (
mkdir "src\backend\base\flow\frontend"
)
REM Remove existing files in target directory (FORCES CLEAN REPLACEMENT)
echo Removing existing files from target directory...
if exist "src\backend\base\flow\frontend\*" (
del /q /s "src\backend\base\flow\frontend\*"
for /d %%d in ("src\backend\base\flow\frontend\*") do rmdir /s /q "%%d"
)
REM Copy all files from build directory
xcopy "%BUILD_DIR%\*" "src\backend\base\flow\frontend\" /e /i /y
if errorlevel 1 (
echo Error: Failed to copy build files
pause
exit /b 1
)
echo Build files copied successfully!
echo.
echo Step 4: Running Hanzo Flow...
echo.
echo Attention: Wait until uvicorn is running before opening the browser
echo.
REM Change to project root directory for uv
cd "%PROJECT_ROOT%"
if defined USE_ENV_FILE (
echo Using env file: .env
uv run --env-file ".env" flow run
) else (
uv run flow run
)
if errorlevel 1 (
echo Error: Failed to run flow
pause
exit /b 1
)
echo.
echo Hanzo Flow build and run process completed!
pause