Okay so I have an SVN repo setup on my server. I have a post-commit hook setup that updates to a "DEV" folder so that when I commit changes, it automatically pushes to my "DEV" subdomain on my server.
What I need now is an easy way to push it to my "Live" subdomain when I am ready. The "Live" subdomain is on the same server, and in reality, it would be the same svn update /... command as with the DEV, but to a different path.
I was thinking I could have a specific file in my repo, and maybe I could just change this file, and then make some sort of condition in my post-commit file to also update to my "live" dir if that specific file has changed.
But I don't know how to write that code. Currently my post-commit file looks like this:
#!/bin/sh
REPOS="$1"
REV="$2"
svn update /var/www/dev/public
I need it to basically do this (but with correct syntax, obviously)
#!/bin/sh
REPOS="$1"
REV="$2"
svn update /var/www/dev/public
if (pushLive.txt has changed) {
svn update /var/www/live/public
}
Anybody have any suggestions?
not sure if this is the most efficient way, and also this the first case will technically work on a file called "pushLive.txt" regardless of dir, so you might wanna play with that or make sure file is unique...