Skip to content

Commit 847f854

Browse files
silverwinddelvh
andauthored
Enable color for consistency checks diffs (#23563)
Drone can display terminal colors, so force-enable it to make diffs more readable on it. Co-authored-by: delvh <[email protected]>
1 parent 85ca8bf commit 847f854

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ fmt:
273273

274274
.PHONY: fmt-check
275275
fmt-check: fmt
276-
@diff=$$(git diff $(GO_SOURCES) templates $(WEB_DIRS)); \
276+
@diff=$$(git diff --color=always $(GO_SOURCES) templates $(WEB_DIRS)); \
277277
if [ -n "$$diff" ]; then \
278278
echo "Please run 'make fmt' and commit the result:"; \
279279
echo "$${diff}"; \
@@ -309,7 +309,7 @@ $(SWAGGER_SPEC): $(GO_SOURCES_NO_BINDATA)
309309

310310
.PHONY: swagger-check
311311
swagger-check: generate-swagger
312-
@diff=$$(git diff '$(SWAGGER_SPEC)'); \
312+
@diff=$$(git diff --color=always '$(SWAGGER_SPEC)'); \
313313
if [ -n "$$diff" ]; then \
314314
echo "Please run 'make generate-swagger' and commit the result:"; \
315315
echo "$${diff}"; \
@@ -414,7 +414,7 @@ vendor: go.mod go.sum
414414

415415
.PHONY: tidy-check
416416
tidy-check: tidy
417-
@diff=$$(git diff go.mod go.sum $(GO_LICENSE_FILE)); \
417+
@diff=$$(git diff --color=always go.mod go.sum $(GO_LICENSE_FILE)); \
418418
if [ -n "$$diff" ]; then \
419419
echo "Please run 'make tidy' and commit the result:"; \
420420
echo "$${diff}"; \
@@ -885,7 +885,7 @@ svg: node-check | node_modules
885885
.PHONY: svg-check
886886
svg-check: svg
887887
@git add $(SVG_DEST_DIR)
888-
@diff=$$(git diff --cached $(SVG_DEST_DIR)); \
888+
@diff=$$(git diff --color=always --cached $(SVG_DEST_DIR)); \
889889
if [ -n "$$diff" ]; then \
890890
echo "Please run 'make svg' and 'git add $(SVG_DEST_DIR)' and commit the result:"; \
891891
echo "$${diff}"; \
@@ -895,7 +895,7 @@ svg-check: svg
895895
.PHONY: lockfile-check
896896
lockfile-check:
897897
npm install --package-lock-only
898-
@diff=$$(git diff package-lock.json); \
898+
@diff=$$(git diff --color=always package-lock.json); \
899899
if [ -n "$$diff" ]; then \
900900
echo "package-lock.json is inconsistent with package.json"; \
901901
echo "Please run 'npm install --package-lock-only' and commit the result:"; \

0 commit comments

Comments
 (0)