[prow/ci] fix compatibility for testing on macOS
Fixes sed and grep issues on BSD/macOS
before, when testing locally, when grep fails silently, it returns empty strings. these are then interpreted by bash as 0, which in turn alters the git diff range being looked at for vale errors
sed -i was tripping up on certain module names, like backup-etcd.adoc and interpreting them as arguments or something. i just added an empty string
Version(s): main
🤖 Wed Dec 17 23:46:01 - Prow CI generated the docs preview:
https://104106--ocpdocs-pr.netlify.app/
@jldohmann Since this script is only run in a Linux environment (automatically, anyway), would it make more sense to add a Mac-specific version to the dir it's in for when people need to troubleshoot?
Might be somewhat annoying to keep them in sync if we're making a lot of changes, but I'm also nervous about changing anything that doesn't absolutely need changing in these shell scripts at the moment.
Superior usability/error handling/everything could come with a move away from bash.
@maxwelldb i mean we could do that, but as we continue to work on this script that doubles the amount of changes and testing that i need to do when investigating locally. are you seeing issues with it on debian?
i mean like are you running in on debian and seeing errors? it should behave the same way
Buuuuuuut, if we want to keep this, could we detect OS? Don't know how brittle that would be
we can do that but it's superfluous imo
@jldohmann: all tests passed!
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.