Separate generate swagger + fix sed os specific - #1791
Merged
Conversation
Member
Author
|
For the build failing it seems that it's #1766 that change a func names and so any PR not rebased over that will failed (so not swagger). We can still separate swagger from go generate for overhead. |
appleboy
reviewed
Jun 15, 2017
Member
There was a problem hiding this comment.
We need to support sed command for MacOS version.
See https://github.com/appleboy/golang-testing/blob/master/coverage.sh#L130-L131
for compatibility with mac os default sed version. This is a little hacky a better solution could be use.
depending of platform detection
sapk
force-pushed
the
separate-generate-swagger
branch
from
June 15, 2017 09:46
4b65a21 to
d1b6739
Compare
Member
Author
|
Ok this was rebase and ready to ship. @lunny can you confirm that this sed command works on mac os ? |
Member
|
I confirmed that this fixed #1665 on macOS. LGTM |
appleboy
approved these changes
Jun 15, 2017
appleboy
left a comment
Member
There was a problem hiding this comment.
Great work. I can confirm this PR working in Mac.
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I suggest to remove generation of swagger file via
go generateand make a separate make task.Making it in go generate permit that any change in comments would update the docs but it add some overhead and seems to failed on CI build (maybe from change introduce in go-swagger ?). :-(
With this change, people redacting api docs would have to do
make generate-swaggerto rebuild the swagger.json file.Related to : #1785 #1665