User Tools

Site Tools


how_to:svn_pull

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
how_to:svn_pull [2011/09/16 12:48]
ccagle8 created
— (current)
Line 1: Line 1:
-====== How to Upgrade Automatically via the SVN ====== 
  
-GetSimple has an SVN setup over on Google Code. You have the ability to automatically pull down the latest SVN copy with the script below. ​ 
- 
-<pre> 
-<?php 
-/* 
- Pulls the new admin directory directly from the GetSimple SVN 
-  
- The paths don't need to be '​absolute',​ but I have them this way because my host required absolute paths for cron jobs. 
-  
-*/ 
- 
- # setup 
- ignore_user_abort(true);​ 
- set_time_limit(0);​ 
- include_once('/​absolute/​path/​to/​scripts/​svnpull/​phpsvnclient.php'​);​ 
- 
-echo "​["​.date('​r'​)."​] Started";​ 
- 
- # create new instance of svn client 
- $svnurl = '​http://​get-simple-cms.googlecode.com/​svn/';​ 
- $phpsvnclient = new phpsvnclient($svnurl);​ 
-  
- # rename old admin directory 
- rename('/​absolute/​path/​to/​getsimple/',​ '/​absolute/​path/​to/​getsimple-old/'​);​ 
-  
- # create new admin directory 
- mkdir('/​absolute/​path/​to/​getsimple/'​);​ 
- 
-echo "​["​.date('​r'​)."​] Copying...";​ 
-  
- # pull new admin directory. ​ 
- $phpsvnclient->​checkOut('​trunk/',​ '/​absolute/​path/​to/​getsimple/'​);​ 
- 
-?> 
-</​pre>​ 
how_to/svn_pull.1316177335.txt.gz ยท Last modified: 2013/04/19 14:56 (external edit)