diff --git a/data/version.yml b/data/version.yml index 0f8f0f312c..25c76e0ed5 100644 --- a/data/version.yml +++ b/data/version.yml @@ -1,3 +1,18 @@ +0.14.2: + release_date: "2015/10/02" + git_commit: "dceccca" + new_features: + all: [] + students: + coaches: [] + admins: [] + bugs_fixed: + all: + Properly compare language pack versions (#4587). + students: [] + coaches: [] + admins: [] + 0.14.1: release_date: "2015/10/02" git_commit: "0818d65" diff --git a/kalite/updates/static/js/updates/update_languages.js b/kalite/updates/static/js/updates/update_languages.js index 51ac036852..3d5af88a6e 100644 --- a/kalite/updates/static/js/updates/update_languages.js +++ b/kalite/updates/static/js/updates/update_languages.js @@ -3,12 +3,18 @@ var installed_languages = []; var downloading = false; function version_comparison(v1, v2) { - // compare two version strings and return 1 if the first is higher than the second, - // -1 if the first is lower than the second, and 0 if they are equal + /* + compare two version strings and return 1 if the first is higher than the second, + -1 if the first is lower than the second, and 0 if they are equal. + + :params v1, v2: Version strings expected format is either "N.N.N" or "N.N", where N is a positive integer. + If both strings have the same format, they're compared using a lexical order. + If one string is shorter than the other, then the other is truncated and then compared using lexical order. + */ var v1parts = v1.split('.'), v2parts = v2.split('.'); - var maxLen = Math.max(v1parts.length, v2parts.length); + var minLen = Math.min(v1parts.length, v2parts.length); var part1, part2; - for(var i = 0; i < maxLen; i++) { + for(var i = 0; i < minLen; i++) { part1 = parseInt(v1parts[i], 10) || 0; part2 = parseInt(v2parts[i], 10) || 0; if (part1 > part2) return 1; diff --git a/kalite/version.py b/kalite/version.py index 75056850ec..4b9243791f 100644 --- a/kalite/version.py +++ b/kalite/version.py @@ -7,7 +7,7 @@ # Must also be of the form N.N.N for internal use, where N is a non-negative integer MAJOR_VERSION = "0" MINOR_VERSION = "14" -PATCH_VERSION = "1" +PATCH_VERSION = "2" VERSION = "%s.%s.%s" % (MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION) SHORTVERSION = "%s.%s" % (MAJOR_VERSION, MINOR_VERSION)