The Ergo Project website(s) are managed through GIT, to allow tracking the development history and collaboration on further development.
The GIT repository can be viewed through Gitweb, or cloned through the following locations:
The GIT repository has multiple branches. At the time of this writing, these branches are master and test. The point of these branches is to be able to test certain modules and changes outside of the realm of the master branch, and to be able to merge the changes back into the master branch.
First, obtain a copy of the GIT repository:
$ git clone ssh://git.ergo-project.org/git/ergo/web ergo-web.git
Then, navigate to the ergo-project.org/www/ directory. The contents of this directory are, at the time of this writing:
$ ls -l
total 4276
drwxrwsr-x. 9 jmeeuwen jmeeuwen 4096 2010-03-04 12:33 drupal-6.15
drwxrwsr-x. 9 jmeeuwen jmeeuwen 4096 2010-03-04 01:20 drupal-6.16
lrwxrwxrwx. 1 jmeeuwen jmeeuwen 11 2010-03-04 12:33 public_html -> drupal-6.16
drwxrwsr-x. 2 jmeeuwen jmeeuwen 4096 2010-02-25 15:30 usage
You can see here, two versions of Drupal, and one symbolic link that lets the webserver use the drupal-6.16 tree through having the DocumentRoot point to the public_html symbolic link.
You can also see that the files and directories are (supposed to be) group writeable with the sticky bit set. This causes the production version to also have those permissions, so that group permissions can be given to the www-ergo-project.org group.
This example shows you how to add a module. Before adding the module, please verify whether this module had been added, enabled and installed before using `git log`. We use the commit message convention of "Add module <name>" and "Remove module <name> (<reason>)" in order to be able to retrieve such facts.
Suppose we add the module "foo". Take the following steps:
$ git add ergo-project.org/www/public_html/sites/all/modules/foo/
$ git commit -m "Add module foo" ergo-project.org/www/public_html/sites/all/modules/foo/
This example shows you how to update a module.
$ rm -rf ergo-project.org/www/public_html/sites/all/modules/foo/
$ git add ergo-project.org/www/public_html/sites/all/modules/foo/
$ git commit -m "Update module foo" ergo-project.org/www/public_html/sites/all/modules/foo/
When making changes to the test version, please realize that the master branch may have had a couple of commits that were sufficiently non-intrusive to allow to be released to the production version directly, skipping the test version of the website. Pull in those changes to the test branch (preferrably before making any changes to the test branch):
$ git checkout test
$ git merge origin/master
Also note that the test-version of the website uses a different copy of the database. The database contains, amongst other things, the modules that are installed, enabled and how they are configured. You will need to create a copy of the production database before deploying the test version of the website:
$ sudo /usr/local/bin/ergo-reset-testdb-to-proddb
To deploy the changes, you require group membership of 'www-ergo-project.org', and a shell account on the www.ergo-project.org server.
To deploy the master branch to www.ergo-project.org, run the following command:
$ ergo-release-git-to-prod
This does the following:
To deploy the test branch to www-test.ergo-project.org, run the following commands:
$ sudo /usr/local/bin/ergo-reset-testdb-to-proddb
$ ergo-release-git-to-test
This performs the following actions: