Fix #6468 - Uses space match and adds newline for all sed flavors #6473
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for: #6468
This makes it so both GNU sed (Linux) and FreeBSD sed (MacOS) can be used for the sed commands used after the swagger command in
make generate-swagger
.FreeBSD sed does not support \s so just a space is used now between basePath: and "/api/v1" as that all there will be.
For the new line at end of file, FreeBSD feels it should always add it, GNU sed does not. Easiest to add the
-e '$a\'
command which adds a new line at the end of a file if one doesn't already exist.Before one could use homebrew to install GNU sed and rename gsed to sed, but now one can't. Also aliasing gsed to sed was not possible.