tag: des OS Io for Ar art Code
1. auto_build_eas.bat @ echo off @ echo ------------------------- @ echo only change variables belowset msbuilddir = % WinDir % \ Microsoft. net \ framework \ v3.5set buildtype = releaseset workingspace = D: \ workingspace \ projects \ shgt_erp \ trunkset sourcedir = % workingspace % \ 02-sourcesset solutiondir = % sourcedir % \ n-easset solutionpath = % solutiondir % \ ni. EAS. all. slnset binoutput = binoutputrem CD to the folder of this commandpu SHD % ~ Dp0 @ echo ------------------------- @ echo start to get latest and build Ni. EAS. all solution @ echo remove old log filesdel logs \/Q/S/f @ echo ------------------------- @ echo get lastest for % workingspace % SVN update % workingspace % @ echo get lastest finished @ echo response ------------------------- @ echo clear binoutputdel % solutiondir % \ % binoutput % \/Q/S/f @ echo clear binoutput finished @ echo ----------------------- -- @ Echo building startcall % msbuilddir % \ msbuild % solutionpath %/T: rebuild/P: configuration = % buildtype %> logs \ ni. EAS. log @ echo building finsihed @ echo ----------------------- find "0 error (s)" logs \ ni. EAS. log & Echo "no error"> logs \ no_error.txtif exist logs \ no_error.txt (goto succeed) else (goto failed): succeedcall deploy. bat % solutiondir % call deploy_jobs.bat % sourcedir % buildtype % echo deploy Succeedpauseexit: failedecho deploy failedpauseexit -------------------------------------------------------------------------- 2. Deploy. batset solutiondir = % 1 Set destdir = D: \ easset servicedir = % solutiondir % \ serviceset servicedestdir = % destdir % \ serviceset portaldir = % solutiondir % \ portal \ ni. EAS. presentation. webset portaldestdir = % destdir % \ ni. EAS. presentation. webset apidir = % solutiondir % \ portal \ ni. EAS. presen Tation. apiset apidestdir = % destdir % \ ni. EAS. presentation. API @ echo backup the latest versiondel Bak \/Q/S/fxcopy % destdir % \*. * Bak \/S/y/exclude: skipfiles.txt @ echo copy to destinationnet stop w3svcxcopy % servicedir % \*. * % servicedestdir % \/S/D/y/exclude: skipfiles.txt xcopy % portaldir % \*. * % portaldestdir % \/S/D/y/exclude: skipfiles.txt xcopy % apidir % \*. * % apidestdir % \/S/D/y/exclude: skipfiles. Txtnet start w3svciisreset/restart Release 3, auto_build_jobs.bat @ echo off @ echo ----------------------- @ echo only change variables belowset msbuilddir = % WinDir % \ Microsoft. net \ framework \ v3.5set buildtype = releaseset workingspace = D: \ workingspace \ projects \ shgt_erp \ trunkset sourcedir = % workingspace % \ 02-sourcesset solutiondir = % sourcedi R % \ n-easset solutionpath = % solutiondir % \ ni. EAS. All. slnset binoutput = binoutputrem CD to the folder of this commandpushd % ~ Dp0 @ echo ------------------------- @ echo start to get latest and build Ni. EAS. all solution @ echo remove old log filesdel logs \/Q/S/f @ echo ------------------------- @ echo get lastest for % workingspace % SVN update % workingspace % @ echo get lastest finished @ echo response ------------------------- @ echo clear binoutputdel % solutiondir % \ % binoutput % \/Q/S/f @ echo clear binoutput finished @ echo ----------------------- @ echo building startcall % msbuilddir % \ msbuild % solutionpath %/T: rebuild/P: configuration = % buildtype %> logs \ ni. EAS. log @ echo building finsihed @ echo ----------------------- find "0 error (s)" logs \ ni. EAS. log & Echo "no error"> logs \ javasexist logs \ no_error.txt (goto succeed) else (goto failed): succeedcall failed % sourcedir % buildtype % echo compile succeedpauseexit: failedecho compile failedpauseexit ---------------------------------------------------------------------------- 4. export sourcedir = % 1 Set buildtype = % 2 set export aljobdir = % sourcedir % \ autointerfacetask \ interfacetask \ taskservice \ bin \ % buildtype % set schedulejobdir = % sourcedir % \ N-EAS \ jobs \ ni. EAS. jobs \ bin \ % buildtype % set inclualjobdestdir = D: \ servicerun \ debugset schedulejobdestdir = D: \ scheduler \ bin \ release @ echo backup the latest versiondel bak_jobs \/Q/S/fxcopy % externaljobdestdir % \*. * bak_jobs \ servicerun \/S/y/exclude: skipfiles.txt xcopy % schedulejobdestdir % \*. * bak_jobs \ scheduler \/S/y/exclude: skipfiles.txt @ echo copy to destinationrem net stop financerem xcopy % export aljobdir % \*. * % delealjobdestdir % \/S/D/y/exclude: skipfiles.txt REM Net start financenet stop erpschedluerxcopy % schedulejobdir % \*. * % schedulejobdestdir % \/S/D/y/exclude: skipfiles.txt Net start erpschedluer