2023-09-26 13:08:35 +13:00
|
|
|
# Sort each entry in the top-level dictionary
|
2023-09-26 13:05:50 +13:00
|
|
|
.[] |= sort_by(
|
2023-09-26 14:14:12 +13:00
|
|
|
# Put all strings before objects
|
|
|
|
type == "object",
|
2023-09-26 13:05:50 +13:00
|
|
|
if type == "string"
|
|
|
|
then
|
2023-09-26 13:08:35 +13:00
|
|
|
# Sort string overrides alphabetically
|
2023-09-26 13:05:50 +13:00
|
|
|
.
|
|
|
|
else
|
2023-09-26 13:08:35 +13:00
|
|
|
# Sort entries with an `until` field above entries with a `from` field
|
2023-09-26 13:29:02 +13:00
|
|
|
.from,
|
2023-09-26 13:35:15 +13:00
|
|
|
.until,
|
|
|
|
# Sort build systems with the same `from` and `until` values
|
|
|
|
.buildSystem
|
2023-09-26 13:05:50 +13:00
|
|
|
end
|
|
|
|
)
|