Skip to content

Commit

Permalink
Merge pull request #4354 from damsien/make-remove-spaces
Browse files Browse the repository at this point in the history
🌱 Make `make remove-spaces` compatible with GNU and MAC OS X system
  • Loading branch information
k8s-ci-robot authored Nov 22, 2024
2 parents 794c846 + ee691f4 commit 307342a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ generate: generate-testdata generate-docs ## Update/generate all mock data. You
.PHONY: remove-spaces
remove-spaces:
@echo "Removing trailing spaces"
@find . -type f -name "*.md" -exec sed -i '' 's/[[:space:]]*$$//' {} + || true
@bash -c ' \
if [[ "$$(uname)" == "Linux" ]]; then \
find . -type f -name "*.md" -exec sed -i "s/[[:space:]]*$$//" {} + || true; \
else \
find . -type f -name "*.md" -exec sed -i "" "s/[[:space:]]*$$//" {} + || true; \
fi'

.PHONY: generate-testdata
generate-testdata: ## Update/generate the testdata in $GOPATH/src/sigs.k8s.io/kubebuilder
Expand Down

0 comments on commit 307342a

Please sign in to comment.