Commit 3e806118 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Adjusting the minaccept for deleted version file"

parents c1731283 8156cb44
......@@ -169,13 +169,17 @@ function validate_version($versionfile, $upgradefile) {
}
echo "New version: {$newconfig->version}\n";
}
if ($newconfig->version < $oldconfig->version) {
# Check if version file has been deleted
$isdeleted = `git diff HEAD~1 -- {$versionfile} | grep 'deleted file mode'`;
if ($isdeleted) {
echo "WARNING: {$versionfile} is deleted - this may be due to it being renamed\n";
}
if ($newconfig->version < $oldconfig->version && !$isdeleted) {
echo "ERROR: Version number in {$versionfile} has decreased!\n";
$ERROR = true;
}
if (strlen($newconfig->version) != 10) {
if (strlen($newconfig->version) != 10 && !$isdeleted) {
echo "ERROR: Version number in {$versionfile} should be exactly 10 digits.\n";
$ERROR = true;
}
......
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