← Back to team overview

mahara-contributors team mailing list archive

[Bug 1215662] Re: Check for correct version.php numbers in pre-commit script

 

** Changed in: mahara/1.10
    Milestone: None => 1.10.0

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1215662

Title:
  Check for correct version.php numbers in pre-commit script

Status in Mahara ePortfolio:
  Triaged
Status in Mahara 1.10 series:
  Triaged
Status in Mahara 1.7 series:
  New
Status in Mahara 1.8 series:
  New
Status in Mahara 1.9 series:
  New

Bug description:
  Mahara's version number policy for DB versions in version.php files is
  pretty simple:

  1. in a _STABLE branch, a commit should only increment the version (whether for core or a plugin) by 1
  2. in the master branch, a commit should increment the version to the day's date followed by 00

  Since this is so simple, and we've recently had a mistake from it
  being manually checked, it's a perfect candidate to add to our pre-
  commit checks. The logic can be as follows:

  IF you're modifying a version.php file && changing its $config->version value THEN
      IF the branch ends with "_STABLE" THEN
           Make sure the $config->version is being incremented by 1.
      ELSE
           Make sure the $config->version is higher than the old value, and ends with 00, and is less than or equal to today's date.

  In some cases you might want to increment a version number on the
  master branch by 1 (like if you're pushing through multiple commits on
  the same day). But that's okay, that's what bypassing the pre-commit
  hook is for. ;)

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1215662/+subscriptions


References