Skip to content

Commit c9893a7

Browse files
committed
ci(update-arch): sort by arch
1 parent 65ed4c7 commit c9893a7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

updateArches.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,15 @@ const areVariantArchesEquilivant = (current, stored) => Object.keys(current).len
9090

9191
const formatEntry = ([arch, variants], variantOffset) => `${arch}${' '.repeat(variantOffset - arch.length)}${variants.join(',')}`;
9292

93+
const sortObjectKeys = (obj) => Object.keys(obj)
94+
.sort()
95+
.reduce((acc, key) => ({
96+
...acc,
97+
[key]: obj[key]
98+
}), {});
99+
93100
const storeArchitectures = (variantArches, architecturesFile) => {
94-
const archVariants = invertObject(variantArches);
101+
const archVariants = sortObjectKeys(invertObject(variantArches));
95102
const data = {
96103
'bashbrew-arch': ['variants'],
97104
...archVariants,

0 commit comments

Comments
 (0)