After Windows SVN uploads are automatically deployed to the Web directory, svnweb_php tutorial

Source: Internet
Author: User

After Windows SVN uploads are automatically deployed to the Web directory, Svnweb


The first step

Set the web directory as the working directory

"D:\Program Files (x86) \visualsvn Server\bin\svn.exe" Upgrade "D:\yiyun_www\test"--quiet--username chiyj--password Chiyj

Execute under DOS.

Second step to modify the file

New file under D:\yiyun_code\test\hooks

Post-commit.bat content is as follows

@echo off
SET repos=%1
SET user=%2
SET svn= "D:\Program Files (x86) \visualsvn Server\bin\svn.exe"
SET dir= "D:\yiyun_www\test"
(Call%svn% update%dir%--username chiyj--password chiyj--non-interactive)

Reference http://www.cnblogs.com/xiezhengcai/archive/2013/11/27/3445457.html


SVN automatic deployment to Web server Setup issues

Modify the hook program on the server Post-commit, export the folder that specifies what you want to publish to the Tomcat directory.

The hook program Post-commit is executed automatically after a commit, so that an export operation is performed automatically after each commit, keeping the contents of the Tomcat folder as the content to be published

---------------------------------------------------------------------------
Add:
For example, the SVN access address of your repository is 10.30.11.12:8080/svn/project1, you want to publish the/trunk/web folder under this repository to Tomcat, and the folder address to be published to Tomcat is d:/tomcat/opt/ WEB,SVN Administrator username is ABC, password is 12345, then this hook program should be:
SVN export 10.30.11.12:8080/svn/project1/trunk/web d:/tomcat/opt/web--force--username ABC--password 12345-- No-auth-cache

(I am not familiar with Linux, this line of instruction if there is inconsistent with the Linux syntax, please refer to the principle of self-modification)
Description
1 、--force is said to forcibly overwrite d:/tomcat/opt/web This folder, avoid this folder is not empty times wrong
2 、--Username ABC--password 12345 is automatically passed in the username and password as parameters
3 、--No-auth-cache is saying that the user name and password are not cached for security reasons
4. SVN export exports the contents of the specified URL to the specified folder. The reason why we use export without update is because update causes a hidden. SVN folder, which we don't need.

Of course, if the whole release is a lot of content, it is recommended to use update instead of export, because update only updates the changed parts, and export will re-export all content, network consumption is larger than update.

Windows, configure the SVN then upload, how to assign the project to the upload directory

Synchronous? Landlord's problem description is not very clear ah, if it is to upload the entire project to the SVN repository, go to the community to see the relevant operation video.

Scmeye is currently the most active software configuration management community in the country, welcome to the Community Exchange.
Skyline is a management tool based on SVN's two-time development, skyline is open source software, designed to help the vast SCM quickly complete the configuration work, welcome to come to Exchange
Baidu Search Scmeye can

http://www.bkjia.com/PHPjc/862696.html www.bkjia.com true http://www.bkjia.com/PHPjc/862696.html techarticle after Windows SVN uploads are automatically deployed to the Web directory, svnweb the first step to set the Web directory to the working directory "D:\Program Files (x86) \visualsvn Server\bin\svn.exe" Upgrade "D : \yiyun_www\ ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.