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

Make make colorful #827

Merged
merged 1 commit into from
Jan 12, 2022
Merged

Make make colorful #827

merged 1 commit into from
Jan 12, 2022

Conversation

jkremser
Copy link
Member

what:
s/@echo/@echo -e/g in Makefile

why:

the SHELL := bash on line 36 is causing this:

make deploy-full-local-setup
\n\033[0;33mCreating 2 k8s clusters\033[0m
/Library/Developer/CommandLineTools/usr/bin/make create-local-cluster CLUSTER_NAME=edge-dns
\n\033[0;33mCreate local cluster \033[1;36medge-dns \033[0m
k3d cluster create -c k3d/edge-dns.yaml
INFO[0000] Using config file k3d/edge-dns.yaml (k3d.io/v1alpha3#simple)
INFO[0000] Prep: Network
..

i.e. echo doesn't interpret the escape characters for colors, nor the new lines. Colors can be fixed like this, but new lines (\n) require the echo -e .. (which also fixes the colors)

after:
Screenshot 2022-01-11 at 16 41 26

Signed-off-by: Jirka Kremser [email protected]

Signed-off-by: Jirka Kremser <[email protected]>
Copy link
Contributor

@somaritane somaritane left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kuritka
Copy link
Collaborator

kuritka commented Jan 11, 2022

@jkremser would there be any advantages/disadvantages to using SHELL := /bin/sh instead of the -e (in combination with /bin/bash) argument ?

@jkremser
Copy link
Member Author

@kuritka SHELL := /bin/sh would ran into the issue that on Ubuntu this points to the Dash implementation..

❯ docker run -ti --rm --entrypoint="" ubuntu ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Jul 18  2019 /bin/sh -> dash

Copy link
Collaborator

@kuritka kuritka left a comment

Choose a reason for hiding this comment

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

@jkremser , Thank you for the explanation, lgtm

@jkremser jkremser merged commit 74a43d4 into k8gb-io:master Jan 12, 2022
@jkremser jkremser deleted the makefile-colors branch January 12, 2022 09:14
AugustasV pushed a commit to AugustasV/k8gb that referenced this pull request Jan 16, 2022
Signed-off-by: Jirka Kremser <[email protected]>
Signed-off-by: AugustasV <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants