refactor: Revise check-for-changes.sh#2615
Merged
polarathene merged 7 commits intodocker-mailserver:masterfrom Jun 11, 2022
Merged
refactor: Revise check-for-changes.sh#2615polarathene merged 7 commits intodocker-mailserver:masterfrom
check-for-changes.sh#2615polarathene merged 7 commits intodocker-mailserver:masterfrom
Conversation
6 tasks
This comment was marked as resolved.
This comment was marked as resolved.
This was referenced Jun 4, 2022
Necessary for future commit diffs to not be unnecessarily noisy..
Clarifies what is going on (and how) without having to look it up. To reduce noise in the main logic loop, extracted to a separate method.
No logic changed, only shifted. `REGEX_NEVER_MATCH` and `ACME_CERT_DIR` changed to local scope vars.
The remaining change detection handling is grouped into a separate function.
Better document change dependencies.
8e89062 to
eee8a5a
Compare
casperklein
approved these changes
Jun 11, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is mostly housekeeping for
check-for-changes.sh, in preparation for further refactoring.Changes have been staged via individual commits with messages for further context. It may be easier to follow the changes via commit diffs, than as a whole.
Change Overview:
check-for-changes.shhave been shuffled around and revised a bit._get_changed_files()- I extracted thegrep+sedline to it's own method._postfix_dovecot_changes()- The bulk of change processing was moved to this method. I've added conditionals to only run relevant logic._ssl_changes()- Just shifted, no logic changed.REGEX_NEVER_MATCHandACME_CERT_DIRvars scope set tolocal.Type of change
Checklist: