
@echo off

:: 目标代码仓库
set pub="E:\svn\lolbox\lolboxServer\staticPub\v3.1"

:: 删除产出路径
if exist .\v3.1\ (
	rd .\v3.1  /s /q
	if %errorlevel% == 0 (
		echo old publish director deletel.
	)
)

:: 执行fis编译
call fis3 release -d .

:: 上传产出文件
if %errorlevel% == 0 (

	:: 更新svn
	echo update publish svn.
	call svn update %pub%

	:: 上传文件
	echo upload publish files.	
	rd %pub% /s /q
	md %pub%
	xcopy .\v3.1\* %pub%\* /s /e
	call svn commit E:\svn\lolbox\lolboxServer\staticPub\ -m "lol auto release."
	echo src publish finish.
)

:: 清除产出文件
rd .\v3.1  /s /q