summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-03-19 02:47:47 +0100
committerGitHub <noreply@github.com>2023-03-18 21:47:47 -0400
commit847f8541540be845128c607960ca4fbfe09152c9 (patch)
tree72c34ae66c617fac99c96a129bba31cbca5357f1
parent85ca8bfe2ce68de175d6ac5a82b75a230a17176f (diff)
downloadgitea-847f8541540be845128c607960ca4fbfe09152c9.tar.gz
gitea-847f8541540be845128c607960ca4fbfe09152c9.zip
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 <leon@kske.dev>
-rw-r--r--Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 0d49bdfdfb..58873ccd92 100644
--- a/Makefile
+++ b/Makefile
@@ -273,7 +273,7 @@ fmt:
.PHONY: fmt-check
fmt-check: fmt
- @diff=$$(git diff $(GO_SOURCES) templates $(WEB_DIRS)); \
+ @diff=$$(git diff --color=always $(GO_SOURCES) templates $(WEB_DIRS)); \
if [ -n "$$diff" ]; then \
echo "Please run 'make fmt' and commit the result:"; \
echo "$${diff}"; \
@@ -309,7 +309,7 @@ $(SWAGGER_SPEC): $(GO_SOURCES_NO_BINDATA)
.PHONY: swagger-check
swagger-check: generate-swagger
- @diff=$$(git diff '$(SWAGGER_SPEC)'); \
+ @diff=$$(git diff --color=always '$(SWAGGER_SPEC)'); \
if [ -n "$$diff" ]; then \
echo "Please run 'make generate-swagger' and commit the result:"; \
echo "$${diff}"; \
@@ -414,7 +414,7 @@ vendor: go.mod go.sum
.PHONY: tidy-check
tidy-check: tidy
- @diff=$$(git diff go.mod go.sum $(GO_LICENSE_FILE)); \
+ @diff=$$(git diff --color=always go.mod go.sum $(GO_LICENSE_FILE)); \
if [ -n "$$diff" ]; then \
echo "Please run 'make tidy' and commit the result:"; \
echo "$${diff}"; \
@@ -885,7 +885,7 @@ svg: node-check | node_modules
.PHONY: svg-check
svg-check: svg
@git add $(SVG_DEST_DIR)
- @diff=$$(git diff --cached $(SVG_DEST_DIR)); \
+ @diff=$$(git diff --color=always --cached $(SVG_DEST_DIR)); \
if [ -n "$$diff" ]; then \
echo "Please run 'make svg' and 'git add $(SVG_DEST_DIR)' and commit the result:"; \
echo "$${diff}"; \
@@ -895,7 +895,7 @@ svg-check: svg
.PHONY: lockfile-check
lockfile-check:
npm install --package-lock-only
- @diff=$$(git diff package-lock.json); \
+ @diff=$$(git diff --color=always package-lock.json); \
if [ -n "$$diff" ]; then \
echo "package-lock.json is inconsistent with package.json"; \
echo "Please run 'npm install --package-lock-only' and commit the result:"; \