As everyone is basically using a git checkout of hostmaster, we get a lot of requests on IRC about 'what version of Aegir am I using?' or similar. The response tends to be: 'it's hard to tell'.

We can make everyone's lives easier by introducing a PHP constant, and using standard Drupal stuff to expose it to the end user.

We'd just need to introduce a couple of steps to the release process, one to set the constant to the correct version and one to set it back to dev after tagging.

I'm going to pop this code into a dev branch in a minute, and plan to push it into the 6.x stable branches if no one objects.

Comments

Steven Jones’s picture

Status: Active » Needs review

Pushed into the 'dev/1299508-version-info' branch.

anarcat’s picture

Status: Needs review » Needs work

Why isn't the backend .info file sufficient?

I am hesitant in adding that version information to the frontend, as it means more duplication... If we do, shouldn't we rely on drupal.org's packaging scripts? (This may involve splitting the hosting module out of the install profile, mind you...)

Steven Jones’s picture

Well because technically you could run a different version of Hostmaster from Provision, if your upgrade goes wonky or if you only bother to upgrade part of Aegir.

From a support standpoint it just seems easier to get people to visit the modules page or the status report page and read off the number, rather than trying to find where provision is installed and then find the line in the info file, and then ask if they updated properly etc.

We can't rely on d.o packaging scripts because every hostmaster install that provision makes uses the git checkout of hostmaster, so the version numbers are not specified at all. The way I've implemented it is basically a copy of the way that Drupal 7 does it.

This would introduce a simple step to the release process, change the version number in one place, commit, tag, change the number back, commit, push.

Steven Jones’s picture

Status: Needs work » Closed (won't fix)

Let's not worry about this then.