Commit 78b2638d authored by Aaron Wells's avatar Aaron Wells
Browse files

Precommit: Make sure the version number is 10 digits.

Bug 1215662. Checks for typos where you accidentally leave out or add an extra digit to it

Change-Id: I41f5ffcff785698441b8cc9624e1cd12064a3a4c
parent eb346d27
......@@ -14,6 +14,11 @@
* number in lib/version.php.
* It is meant to be used as part of the Makefile's "minaccept" task.
* It assumes that PHP library versions take the format YYYYMMDDXX, where YYYYMMDD is the date in 8-digit format,
* and XX is a sequential integer starting with 0.
* In a stable branch, the YYYYMMDD is frozen and only the XX should increment.
define('INTERNAL', 1);
......@@ -50,6 +55,11 @@ else {
$stablebranch = true;
if (strlen($newconfig->version) != 10) {
echo "(test/versioncheck.php) ERROR: Version number in lib/version.php should be exactly 10 digits.\n";
if ($stablebranch && substr($newconfig->version, 0, 8) != substr($oldconfig->version, 0, 8)) {
echo "(test/versioncheck.php) ERROR: Version number in lib/version.php has gone up too much for a stable branch!\n";
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment