Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add sort ascending by string length in versions.tf files keys array #15

Merged
merged 5 commits into from
Nov 12, 2022

Conversation

bryantbiggs
Copy link
Member

Description

Hi!
Added a simple fix to sort ascending the array keys of versions.tf files. With this we can ensure that the first value will be the versions.tf file of the root path.

Motivation and Context

The motivation for this change is to solve the problem of PR terraform-aws-modules/terraform-aws-alb#264

How Has This Been Tested?

Example of the array obtained in different cases.

  • Before fix:
["wrappers/versions.tf","versions.tf","tests/terraform-aws-alb/wrappers/versions.tf","tests/terraform-aws-alb/versions.tf","tests/terraform-aws-alb/examples/complete-nlb/versions.tf","tests/terraform-aws-alb/examples/complete-alb/versions.tf","tests/0.13/versions.tf","tests/0.12/versions.tf"]
  • After fix:
["versions.tf","wrappers/versions.tf","tests/0.13/versions.tf","tests/0.12/versions.tf","tests/terraform-aws-alb/versions.tf","tests/terraform-aws-alb/wrappers/versions.tf","tests/terraform-aws-alb/examples/complete-nlb/versions.tf","tests/terraform-aws-alb/examples/complete-alb/versions.tf"]

Screenshots (if appropriate):

@bryantbiggs bryantbiggs merged commit 8250970 into main Nov 12, 2022
@bryantbiggs bryantbiggs deleted the chore/additional-tests branch November 12, 2022 13:16
bryantbiggs pushed a commit that referenced this pull request Nov 12, 2022
## [1.2.1](v1.2.0...v1.2.1) (2022-11-12)

### Bug Fixes

* Add sort ascending by string length in versions.tf files keys array ([#15](#15)) ([8250970](8250970))
@bryantbiggs
Copy link
Member Author

🎉 This PR is included in version 1.2.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants