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:
Simon Tatham
2023-01-21 11:57:13 +00:00
parent 88872fe806
commit eac7fc1665

View File

@ -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,