| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
.PHONY: help |
| 15 |
help: |
| 16 |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-25s\033[0m %s\n", $$1, $$2}' |
| 17 |
|
| 18 |
.PHONY: all |
| 19 |
all: test |
| 20 |
|
| 21 |
.PHONY: test |
| 22 |
test: check-line-endings |
| 23 |
go test -race -v -coverprofile=coverage.txt -covermode=atomic ./... |
| 24 |
|
| 25 |
.PHONY: e2e |
| 26 |
e2e: |
| 27 |
cd ./test/e2e && ./run.sh; |
| 28 |
|
| 29 |
.PHONY: clean |
| 30 |
clean: |
| 31 |
git status --ignored --short | grep '^!! ' | sed 's/!! //' | xargs rm -rf |
| 32 |
|
| 33 |
.PHONY: check-line-endings |
| 34 |
check-line-endings: |
| 35 |
! find . -name "*.go" -type f -exec file "{}" ";" | grep CRLF |
| 36 |
|
| 37 |
.PHONY: fix-line-endings |
| 38 |
fix-line-endings: |
| 39 |
find . -type f -name "*.go" -exec sed -i -e "s/\r//g" {} + |