Skip to content

Commit

Permalink
Sort version in version check
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Dec 3, 2020
1 parent 25d3b3e commit bf69507
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions c2cciutils/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,11 @@ def _versions_audit(all_versions, full_config):
"versions",
"The workflow '{}', job '{}' does not have a branch matrix with the right list of "
"versions [{}] != [{}]".format(
filename, name, ", ".join(all_versions), ", ".join(audit_versions)
filename,
name,
", ".join(sorted(audit_versions)),
", ".join(sorted(all_versions)),
),
filename,
)
result = False
return result
Expand Down Expand Up @@ -468,7 +470,7 @@ def _versions_rebuild(all_versions, config, full_config):
error(
"versions",
"The rebuild workflows does not have the right list of versions in the branch matrix "
"[{}] != [{}]".format(", ".join(rebuild_versions), ", ".join(all_versions)),
"[{}] != [{}]".format(", ".join(sorted(rebuild_versions)), ", ".join(sorted(all_versions))),
)
result = False
return result
Expand Down Expand Up @@ -506,7 +508,7 @@ def _versions_backport_labels(all_versions, full_config):
error(
"versions",
"The backport labels do not have the right list of versions [{}] != [{}]".format(
", ".join(label_versions), ", ".join(all_versions)
", ".join(sorted(label_versions)), ", ".join(sorted(all_versions))
),
)
result = False
Expand Down Expand Up @@ -546,7 +548,7 @@ def _versions_branches(all_versions, full_config):
error(
"versions",
"The version from the branches does not correspond with expected versions [{}] != [{}]".format(
", ".join(branche_versions), ", ".join(all_versions)
", ".join(sorted(branche_versions)), ", ".join(sorted(all_versions))
),
)
result = False
Expand Down

0 comments on commit bf69507

Please sign in to comment.