This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
how_to:svn_pull [2013/04/08 22:54] Timbow [Links] |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Automatic Installation via the SVN ====== | ||
- | |||
- | GetSimple has an [[how_to:svn|SVN setup over on Google Code]]. You have the ability to automatically pull down the latest SVN copy with the script below. | ||
- | |||
- | ===== Install PHPSVNClient ===== | ||
- | |||
- | Download and install [[http://code.google.com/p/phpsvnclient/|PHPSVNClient]] and upload it to your server. Make sure you change the ''include_once'' line below to match the new path of where you installed it. | ||
- | |||
- | ===== Install This Script ===== | ||
- | |||
- | Create ''svn.php'', copy in the code below, and upload it to another directory on your server. | ||
- | |||
- | <code> | ||
- | <?php | ||
- | /* | ||
- | Pulls a new GetSimple installation 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/'); | ||
- | |||
- | echo "[".date('r')."] Completed"; | ||
- | |||
- | ?></code> | ||
- | |||
- | ===== Tips & Tricks ===== | ||
- | |||
- | - I have the script using absolute paths. This isn't necessary, but for my host, any cron jobs need to use absolute paths. | ||
- | - You can check out any parts of GetSimple with this script. Variations: | ||
- | |||
- | Checkout only the new ''/admin/'' directory | ||
- | <code>$phpsvnclient->checkOut('trunk/admin/', '/absolute/path/to/getsimple/admin/');</code> | ||
- | |||
- | Checkout a specific version (not beta): | ||
- | <code>$phpsvnclient->checkOut('tags/3.0/', '/absolute/path/to/getsimple/');</code> | ||
- | |||
- | ======Links====== | ||
- | Back to the GetSimple Wiki [[:start|Contents Page]] | ||
- | ==Pages in this Section== | ||
- | ===Installation=== | ||
- | *[[:installation|Installation on a Web Server or a Local Server]] | ||
- | *[[installation:migrating|Migrating, Moving and Uploading Complete Sites]] | ||
- | *[[installation:requirements|Server requirements and Apache Modules]] | ||
- | *[[installation:upgrade|Upgrading to the Latest Version of GetSimple]] | ||
- | *[[how_to:svn_pull|Automatic installation via the SVN ]] | ||
- | *[[installation:specific-webhosters|Guidance for Specific Hosting Companies]] | ||
- | |||
- | |||