拷贝pdb
- 脚本是写给gitlab ci调用的,当所有东西编完后,调用本脚本拷贝pdb文件存下来
- 局域网内,登录过一次目标ftp目录后,可以这样直接copy
- 参数1用来防止双击误启动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
@echo off SETLOCAL enabledelayedexpansion if not "%1"=="--ci" exit /b 1 set dst_path=\\192.168.1.19\pdb_ci\XunYouFramework set src_release_path=.\Release set src_xunyoukernel_path=.\xunyoukernel\output set src_findgame_path=.\XYFindGame\output set src_newgame_path=.\XYNewGame\output set file_name=test git log --pretty=format:%%h -n 1 > hash.tmp set /p git_hash= < hash.tmp set dir_name=%date:~0,4%_%date:~5,2%%date:~8,2%_%time:~0,2%%time:~3,2%%time:~6,2%_%git_hash% echo\ if not exist %dst_path% ( md %dst_path% ) echo "%git_hash%" echo "create dir %dir_name%" md %dst_path%\"%dir_name%" if "%2"=="--all" ( goto :pdbs_all ) if "%2"=="--xybase" ( set file_name=XYBase.pdb echo copy: !file_name! copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=XYInteractive.pdb echo copy: %file_name% copy /Y "%src_release_path%\%file_name%" "%dst_path%\%dir_name%\%file_name%" set file_name=js.pdb echo copy: !file_name! copy /Y "%src_xunyoukernel_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=Game_Find.pdb echo copy: !file_name! copy /Y "%src_findgame_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=XYNewGame.pdb echo copy: !file_name! copy /Y "%src_newgame_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" exit /b 0 ) rem more... :pdbs_all set file_name=AboutXYDlg.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=AcceleratePopDlg.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=AccelerateQualityEvaluateDlg.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=ActivityCenter.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=AddGamePage.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=AreaServerAndNodeSelection.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=ExchangeCenter.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=GameAccelerationDetails.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=GameCardList.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=HostGameNetworkSettingDlg.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=ImpactAccelProcessDlg.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=InfoAndFunction.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=LoginRegist.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=SpeedUpLogDlg.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=ThirdPartyLogin.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=VipCharge.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=xunyou.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=XYBase.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=XYInteractive.pdb echo copy: %file_name% copy /Y "%src_release_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=js.pdb echo copy: %file_name% copy /Y "%src_xunyoukernel_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=Game_Find.pdb echo copy: %file_name% copy /Y "%src_findgame_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" set file_name=XYNewGame.pdb echo copy: %file_name% copy /Y "%src_newgame_path%\!file_name!" "%dst_path%\%dir_name%\!file_name!" echo\ |
pull代码
- 目标文件夹存在的话,就做更新操作,不存在就拉取
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
@echo off if not "%1"=="--ci" exit /b 1 if exist xunyoucommon ( echo "xunyoucommon already exist." echo "reset hard to newest xunyoucommon." pushd xunyoucommon git reset --hard origin/dev_new_ver if not %errorlevel%==0 ( exit /b 1 ) popd exit /b 0 ) echo "clone xunyoucommon" git clone -b dev_new_ver http://192.168.1.27/Research_Dev/common.git if not %errorlevel%==0 ( echo "checkout failed." exit /b 1 ) ren common xunyoucommon |
push代码并判断是否push成功
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
@echo off if not "%1"=="--ci" exit /b 1 pushd build-tools if not %errorlevel%==0 exit /b 1 git add . git commit -m "XunYouFramework update build-tools(dev_new_ver) version." git push -f origin dev_new_ver git status | find "Changes not staged for commit" if %errorlevel%==0 goto :exit_1 git status | find "to publish your local commits" if %errorlevel%==0 goto :exit_1 git status | find "to commit" if not %errorlevel%==0 goto :exit_1 popd echo "All pushed" exit /b 0 :exit_1 popd echo "Not all pushed" exit /b 1 |
本文为原创文章,版权归Aet所有,欢迎分享本文,转载请保留出处!
你可能也喜欢
- ♥ CMD应用记述二07/07
- ♥ 语法函数命令一10/02
- ♥ Windows 窗口以及渲染相关06/15
- ♥ 设计模式:六大原则04/18
- ♥ Cef:沙盒、CefApp、CefClient02/29
- ♥ base_timer04/24