mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
kaios/manifest.pl: canonicalise the JSON output.
The default behaviour of JSON::PP's encode_json output is to write the keys of a hash in Perl's natural hash order, which isn't consistent between runs of the same script due to hash function randomisation. This causes my build system to complain when successive builds from the same source revision don't produce the same output. Easily fixed: JSON::PP already has a switch to ensure consistent ordering, it's just a matter of finding it and turning it on.
This commit is contained in:
@ -32,7 +32,7 @@ if ($version =~ /^20(\d\d)(\d\d)(\d\d)\./) {
|
||||
$decvers = join('.', $1+0, $2+0, $3+0);
|
||||
}
|
||||
|
||||
print encode_json({
|
||||
print JSON::PP->new->canonical->encode({
|
||||
name => $displayname,
|
||||
subtitle => $description,
|
||||
description => $objective,
|
||||
|
Reference in New Issue
Block a user