1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Author: Reiner Herrmann <reiner@reiner-h.de>
Description: Sort commandline arguments to produce stable output
The help text is used to generate a manpage with help2man.
With an unstable argument order the generated manpage will
differ on every build.
--- a/src/webassets/script.py
+++ b/src/webassets/script.py
@@ -447,7 +447,7 @@
# Add subparsers.
subparsers = parser.add_subparsers(dest='command')
- for command in CommandLineEnvironment.DefaultCommands.keys():
+ for command in sorted(CommandLineEnvironment.DefaultCommands.keys()):
command_parser = subparsers.add_parser(command)
maker = getattr(self, 'make_%s_parser' % command, False)
if maker:
|