Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.14.2 #4588

Merged
merged 3 commits into from
Oct 8, 2015
Merged

0.14.2 #4588

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions data/version.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
14 changes: 10 additions & 4 deletions kalite/updates/static/js/updates/update_languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion kalite/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down