Bug 1095162 - fix sort order in |mach generate-addon-sdk-moz-build|; r=mshal
authorNathan Froyd <froydnj@mozilla.com>
Fri, 07 Nov 2014 06:26:07 -0500
changeset 238999 c185e41609f85b3ec1cf1f5b5bb110e11ce569b1
parent 238998 02f36604f77bdd31503d5b95d5f4221c4cebe3d8
child 239000 7262e423b097b5d76dbe6f0d3b16f741726dc200
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1095162
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1095162 - fix sort order in |mach generate-addon-sdk-moz-build|; r=mshal
addon-sdk/mach_commands.py
--- a/addon-sdk/mach_commands.py
+++ b/addon-sdk/mach_commands.py
@@ -98,17 +98,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != "gonk
                     dir_path = ''
                 else:
                     # Ensure that we don't have things like:
                     #   EXTRA_JS_MODULES.commonjs.sdk.private-browsing
                     # which would be a Python syntax error.
                     path = d.split('/')
                     module_path = ''.join('.' + p if p.find('-') == -1 else "['%s']" % p for p in path)
                     dir_path = d + '/'
-                filelist = ["'source/lib/%s%s'" % (dir_path, f) for f in sorted(files)]
+                filelist = ["'source/lib/%s%s'" % (dir_path, f)
+                            for f in sorted(files, key=lambda x: x.lower())]
                 js_modules.append("EXTRA_JS_MODULES.commonjs%s += [\n    %s,\n]\n"
                                   % (module_path, ',\n    '.join(filelist)))
             stringified = '\n'.join(js_modules)
             # This isn't the same thing as |js_modules|, since |js_modules| had
             # embedded newlines.
             lines = stringified.split('\n')
             # Indent lines while avoiding trailing whitespace.
             lines = [indent + line if line else line for line in lines]