Difference between revisions of "Dev Maintenance"
Foxfirefey (Talk | contribs) (→Updating your code: add a warning template) |
Foxfirefey (Talk | contribs) m (→Updating your code: add a warning template) |
||
Line 1: | Line 1: | ||
== Updating your code == | == Updating your code == | ||
− | {{ | + | {{Warn|text='''VERY IMPORTANT: If you have custom changes that you have not committed or patched out, you want to do that first! If you follow these steps without doing so, you will likely muck things up.'''}} |
It is best to shut your Apache instance down before doing the update process, to make sure that everything, especially scripts in cgi-bin/ are reloaded properly: | It is best to shut your Apache instance down before doing the update process, to make sure that everything, especially scripts in cgi-bin/ are reloaded properly: |
Revision as of 16:48, 1 February 2009
Updating your code
It is best to shut your Apache instance down before doing the update process, to make sure that everything, especially scripts in cgi-bin/ are reloaded properly:
sudo /etc/init.d/apache2 stop
Okay. Let's say you've been running your Dreamwidth install and you want to pull down the latest and greatest in fixes. This is pretty easy.
cd $LJHOME bin/cvsreport.pl -update # only sync changes from the CVS to the live code bin/cvsreport.pl -sync -cvsonly bin/cvsreport.pl -sync -cvsonly
Yes, you do it twice. If the multicvs.conf file changed, then the first one pulls that file in, and the second one will notice whatever changed according to that file. 99% of the time once is enough, but every once in a while... so it's a good habit to have.
# order of commands is important $LJHOME/bin/upgrading/update-db.pl -r -p --innodb $LJHOME/bin/upgrading/update-db.pl -r --cluster=all --innodb $LJHOME/bin/upgrading/texttool.pl load
Now you can restart Apache:
sudo /etc/init.d/apache2 start
Of course, in a production environment, this whole process is not too recommended as you never know what kind of code you're going to get. But for the most part, it's fairly straightforward. (And if you're doing development, this is generally safe.)
Updating to the production branch
You can see what branch you are currently on by going to $LJHOME/cvs/dw-free
:
cd $LJHOME/cvs/dw-free hg branch
Work is being done on the 'production' branch. When you create a new copy of the repository, it gets the branch with the label 'tip'. This should be the 'production' branch. You can sync to the 'tip' branch by using:
hg update -C tip
If for some reason 'tip' is not pointing to 'production', then you can sync to 'production' manually by doing 'hg update -C production'
To be running production code, you also need to sync to your live code from the repository copy:
bin/cvsreport.pl -sync -cvsonly
Updating your system
On Ubuntu, you can update the packages on your system with:
apt-get update apt-get upgrade
Or, if you want an easy command to run on your dw account in one swoop:
sudo apt-get update && sudo apt-get upgrade