In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
If you find that you are doing a very tedious thing every day, then you must be able to simplify it!
Found:
When the developer commits the code to the code server, there is nothing for them to do. All that is left is for us to push the code to the online server. The process is not complicated, but it is very tedious and boring. First of all, we need to update the latest version under the developed svn directory, and then update the pushed svn directory to make sure that the directories of the two svn are up to date, otherwise there may be errors when submitting. Then copy the development svn directory to the pushed svn directory, and submit it, and finally remotely go to the push server for code pull and push
Simplify:
Something a bat script should do.
@ echo off echo. Please enter the update directory: set / p dir_id=# sets the svn native code path for development set exploit=C:\ web\ trunk\ ciwebs\% dir_id%# sets the svn local code path for push set rsync=C:\ svn818\ wwwuser\ public_html\ ciwebs\% dir_id%# to determine whether if exist% exploit% exists in the path (# update the developed svn native code svn update "% exploit% with the 'svn update' statement "pause # uses the 'svn update' statement to update the pushed svn native code svn update"% rsync% "pause # forces the deletion of the pushed svn native code del"% rsync%\ * "/ f / s / Q / a # traverses the developed svn native code And copy it to the pushed svn local code for / f "delims="% I in ('dir / ad / w / b "% m%"') do (rd / s / Q "% m%\% I") xcopy% web%% svn818% / s / e pause # enter the pushed svn local code path and submit it to cd% svn818% svn add *-- force svn ci-m " "pause) else (echo warning: there is no request directory for this site! Pause exit) # output the shell command to a text echo svn update / var/www/html/%dir_id% > E:\ svn_shell.txtecho cd / shell > > E:\ svn_shell.txtecho. Enter the updated ID:set / p site_id=# to query whether the wap string echo% site_id% exists in the site_id | findstr "wap" > nul# to determine whether the query result is equal to 0if% errorlevel% equ 0 (echo echo% site_id% ^ > wap.txt > > E:\ svn_shell.txt) else (echo echo% site_id% ^ > pc.txt > > E:\ svn_shell.txt) # Connect to the server to execute the text The content of this book putty-ssh root@192.168.1.100 22-pw 123456-m E:\ svn_shell.txt
Everything OK, from now on can drink coffee to update the push code ~ ~
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 204
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.