-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #6468 - Uses space match and adds newline for all sed flavors #6473
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6473 +/- ##
==========================================
- Coverage 39.4% 39.39% -0.01%
==========================================
Files 393 393
Lines 53271 53271
==========================================
- Hits 20992 20988 -4
- Misses 29292 29297 +5
+ Partials 2987 2986 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always feel it's a shame that bsd never takes obvious gnu improvements - or even proposes them to POSIX. It almost feels like a case of NIH.
Fine, I guess we need to do this.
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.