pull: Add sort_keys=True for license.jsonld
authorW. Trevor King <wking@tremily.us>
Sun, 15 Apr 2018 04:55:00 +0000 (21:55 -0700)
committerW. Trevor King <wking@tremily.us>
Sun, 15 Apr 2018 04:55:00 +0000 (21:55 -0700)
I'd missed this in 8398a357 (pull: Add JSON-LD markup, 2018-01-04,
#12).  Adding it here reduces unnecessary churn in the gh-pages
branch.

pull.py

diff --git a/pull.py b/pull.py
index c4da6a2a5e9b1246d6409ac8e61eb64dc3211aac..9836d5510843193545a90bbd5f070ce3e1a91ff6 100755 (executable)
--- a/pull.py
+++ b/pull.py
@@ -301,7 +301,7 @@ def save(licenses, base_uri, dir=os.curdir):
         },
     }
     with open(os.path.join(schema_dir, 'license.jsonld'), 'w') as f:
-        json.dump(obj=license_schema, fp=f, indent=2)
+        json.dump(obj=license_schema, fp=f, indent=2, sort_keys=True)
         f.write('\n')
     license_schema_uri = urllib.parse.urljoin(
         base=base_uri, url='schema/license.jsonld')