← Back to team overview

mahara-contributors team mailing list archive

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

 

Public bug reported:

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.
;)

** Affects: mahara
     Importance: Medium
     Assignee: Aaron Wells (u-aaronw)
         Status: Triaged

** Affects: mahara/1.5
     Importance: Undecided
         Status: New

** Affects: mahara/1.6
     Importance: Undecided
         Status: New

** Affects: mahara/1.7
     Importance: Undecided
         Status: New


** Tags: tests

** Also affects: mahara/1.5
   Importance: Undecided
       Status: New

** Also affects: mahara/1.6
   Importance: Undecided
       Status: New

** Also affects: mahara/1.7
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contrib members
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.5 series:
  New
Status in Mahara 1.6 series:
  New
Status in Mahara 1.7 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


Follow ups

References