Skip to content

scripts: use color variables instead of escape codes#2565

Merged
casperklein merged 6 commits intodocker-mailserver:masterfrom
casperklein:colors
May 10, 2022
Merged

scripts: use color variables instead of escape codes#2565
casperklein merged 6 commits intodocker-mailserver:masterfrom
casperklein:colors

Conversation

@casperklein
Copy link
Copy Markdown
Member

@casperklein casperklein commented Apr 28, 2022

Description

This PR streamlines the color usage of the scripts. Color variables are now globally defined in log.sh. I did not use a separate file like colors.sh, because some scripts only source log.sh

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change that does improve existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@casperklein casperklein self-assigned this Apr 28, 2022
@casperklein casperklein added this to the v11.1.0 milestone Apr 28, 2022
@casperklein casperklein added area/scripts kind/improvement Improve an existing feature, configuration file or the documentation labels Apr 28, 2022
@casperklein casperklein marked this pull request as ready for review April 28, 2022 00:25
@casperklein casperklein requested a review from a team April 28, 2022 00:25
casperklein added a commit to casperklein/archive_docker-mailserver that referenced this pull request Apr 28, 2022
Comment thread target/scripts/helpers/log.sh
Copy link
Copy Markdown
Member

@polarathene polarathene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it's clear from the variable name what the usage is

I'm not sure if that applies to ${RESET} though?

Depending on which PR gets merged first, might want to keep #2535 in mind since it's adding a bunch of new setup commands that would need to be converted.

@casperklein
Copy link
Copy Markdown
Member Author

I'm not sure if that applies to ${RESET} though?

Standing alone, maybe not. But it's only used in context of color usage so I think it's fine.

@casperklein
Copy link
Copy Markdown
Member Author

To not make things harder for #2535, I'll wait with merging this.

Copy link
Copy Markdown
Member

@georglauterbach georglauterbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we, in the future, realize that we may need the prefix we can always add it :)

@casperklein casperklein merged commit 372e3fe into docker-mailserver:master May 10, 2022
@casperklein casperklein deleted the colors branch May 10, 2022 15:50
@georglauterbach georglauterbach changed the title Use color variables instead of escape codes scripts: use color variables instead of escape codes May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/scripts kind/improvement Improve an existing feature, configuration file or the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants