Commit e65a7893 authored by Robert Lyon's avatar Robert Lyon

Debugging version check change

Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 25d0bfcf
...@@ -476,14 +476,17 @@ function gerrit_comment($comment, $printtoconsole = true) { ...@@ -476,14 +476,17 @@ function gerrit_comment($comment, $printtoconsole = true) {
* @return bool * @return bool
*/ */
function branch_above($branch, $major, $minor) { function branch_above($branch, $major, $minor) {
echo "Branch: " . $branch . "\n";
// If the branch is master it should have all we need // If the branch is master it should have all we need
if ($branch == 'master') { if ($branch == 'master') {
return true; return true;
} }
$branch = explode('_', $branch); $branch = explode('_', $branch);
echo "Branch parts: " . print_r($branch, true) . "\n";
// Get the major.minor version // Get the major.minor version
$branchversion = explode('.', $branch[0]); $branchversion = explode('.', $branch[0]);
if ((int) $major >= (int) $branchversion[0] && (int) $minor > (int) $branch[1]) { echo "Branch version parts: " . print_r($branchversion, true) . "\n";
if ((int) $major >= (int) $branchversion[0] && (int) $minor > (int) $branchversion[1]) {
return true; return true;
} }
return false; return false;
......
Markdown is supported
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