prevent verify-misspelling failing on releases

Removes pull request subjects from release notes and checks
the remainder of text.
This commit is contained in:
Mikulas Dite 2018-08-16 11:00:46 +02:00 committed by Mikuláš Dítě
parent 5af0b32eea
commit 3127296c69
1 changed files with 5 additions and 1 deletions

View File

@ -517,12 +517,16 @@ verify-gofmt:
verify-packages: ${BINDATA_TARGETS}
hack/verify-packages.sh
# find release notes, remove PR titles and output the rest to .build, then run misspell on all files
.PHONY: verify-misspelling
verify-misspelling:
@which misspell 2>/dev/null ; if [ $$? -eq 1 ]; then \
go get -u github.com/client9/misspell/cmd/misspell; \
fi
@find . -type f \( -name "*.go*" -o -name "*.md*" \) -a \( -not -path "./vendor/*" -not -path "./_vendor/*" \) | \
@mkdir -p .build/docs
@find . -type f \( -name "*.go*" -o -name "*.md*" \) -a -path "./docs/releases/*" -exec basename {} \; | \
xargs -I{} sh -c 'sed -e "/^\* .*github.com\/kubernetes\/kops\/pull/d" docs/releases/{} > .build/docs/$(basename {})'
@find . -type f \( -name "*.go*" -o -name "*.md*" \) -a \( -not -path "./vendor/*" -not -path "./_vendor/*" -not -path "./docs/releases/*" \) | \
sed -e /README-ES.md/d -e /node_modules/d | \
xargs misspell -error