Files
geMoldInsight/deploy/generate_lockfiles.bat
T

39 lines
1.3 KiB
Batchfile
Raw Normal View History

@echo off
REM ============================================================
REM geMoldInsight pip 锁文件生成脚本(TECH_DEBT D13,Windows 版)
REM ============================================================
REM
REM 用法:在 gemold conda 环境内执行 deploy\generate_lockfiles.bat
REM
REM 产物:
REM deploy\requirements-base.lock.txt
REM deploy\requirements-moldinsight.lock.txt
REM ============================================================
setlocal enabledelayedexpansion
cd /d "%~dp0\.."
where conda >nul 2>&1
if errorlevel 1 (
echo [ERROR] conda 未安装或不在 PATH,请先激活 conda 环境 ^(推荐 moldinsight^) 1>&2
exit /b 1
)
if not "%CONDA_DEFAULT_ENV%"=="moldinsight" if not "%CONDA_DEFAULT_ENV%"=="gemold" (
echo [WARN] 当前 conda 环境为 '%CONDA_DEFAULT_ENV%',推荐在 'moldinsight' 内执行
)
echo ==^> 生成 base 锁文件
pip freeze --exclude pythonocc-core > deploy\requirements-base.lock.txt
echo ==^> 生成 moldinsight 锁文件
pip freeze --exclude pythonocc-core > deploy\requirements-moldinsight.lock.txt
echo.
echo 已生成:
echo deploy\requirements-base.lock.txt
echo deploy\requirements-moldinsight.lock.txt
echo.
echo 下一步:提交两个 lock.txt,并按团队策略同步更新 requirements-*.txt 下限。
endlocal