Skip to content

Commit

Permalink
ci(update-arch): sort by arch
Browse files Browse the repository at this point in the history
  • Loading branch information
ttshivers committed Sep 30, 2020
1 parent 65ed4c7 commit c9893a7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion updateArches.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,15 @@ const areVariantArchesEquilivant = (current, stored) => Object.keys(current).len

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

const sortObjectKeys = (obj) => Object.keys(obj)
.sort()
.reduce((acc, key) => ({
...acc,
[key]: obj[key]
}), {});

const storeArchitectures = (variantArches, architecturesFile) => {
const archVariants = invertObject(variantArches);
const archVariants = sortObjectKeys(invertObject(variantArches));
const data = {
'bashbrew-arch': ['variants'],
...archVariants,
Expand Down

0 comments on commit c9893a7

Please sign in to comment.