File tree Expand file tree Collapse file tree 3 files changed +26
-5
lines changed
updates/static/js/updates Expand file tree Collapse file tree 3 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 1+ 0.14.2 :
2+ release_date : " 2015/10/02"
3+ git_commit : " dceccca"
4+ new_features :
5+ all : []
6+ students :
7+ coaches : []
8+ admins : []
9+ bugs_fixed :
10+ all :
11+ Properly compare language pack versions (#4587).
12+ students : []
13+ coaches : []
14+ admins : []
15+
1160.14.1 :
217 release_date : " 2015/10/02"
318 git_commit : " 0818d65"
Original file line number Diff line number Diff line change @@ -3,12 +3,18 @@ var installed_languages = [];
33var downloading = false ;
44
55function version_comparison ( v1 , v2 ) {
6- // compare two version strings and return 1 if the first is higher than the second,
7- // -1 if the first is lower than the second, and 0 if they are equal
6+ /*
7+ compare two version strings and return 1 if the first is higher than the second,
8+ -1 if the first is lower than the second, and 0 if they are equal.
9+
10+ :params v1, v2: Version strings expected format is either "N.N.N" or "N.N", where N is a positive integer.
11+ If both strings have the same format, they're compared using a lexical order.
12+ If one string is shorter than the other, then the other is truncated and then compared using lexical order.
13+ */
814 var v1parts = v1 . split ( '.' ) , v2parts = v2 . split ( '.' ) ;
9- var maxLen = Math . max ( v1parts . length , v2parts . length ) ;
15+ var minLen = Math . min ( v1parts . length , v2parts . length ) ;
1016 var part1 , part2 ;
11- for ( var i = 0 ; i < maxLen ; i ++ ) {
17+ for ( var i = 0 ; i < minLen ; i ++ ) {
1218 part1 = parseInt ( v1parts [ i ] , 10 ) || 0 ;
1319 part2 = parseInt ( v2parts [ i ] , 10 ) || 0 ;
1420 if ( part1 > part2 ) return 1 ;
Original file line number Diff line number Diff line change 77# Must also be of the form N.N.N for internal use, where N is a non-negative integer
88MAJOR_VERSION = "0"
99MINOR_VERSION = "14"
10- PATCH_VERSION = "1 "
10+ PATCH_VERSION = "2 "
1111VERSION = "%s.%s.%s" % (MAJOR_VERSION , MINOR_VERSION , PATCH_VERSION )
1212SHORTVERSION = "%s.%s" % (MAJOR_VERSION , MINOR_VERSION )
1313
You can’t perform that action at this time.
0 commit comments