-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
docgen tool: Remove sed usage #17492
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
} | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func newParentLinkSedCommand(parent string, file string) *exec.Cmd { | ||
return exec.Command("sed", "-i", "", "-e", fmt.Sprintf("s:(./%s/):(../):i", parent), file) | ||
return exec.Command("xyz", "-i", "-e", fmt.Sprintf("s:(./%s/):(../):i", parent), file) |
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.
@rohit-nayak-ps What tool does this refer to? Or can this be removed at this point?
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.
Oops, duh. Sorry, I was testing something and my subsequent search for "sed" didn't show me this line. Removing. Looks like this function is never getting called since it is not erroring out. Will remove it entirely and test.
Description
The
docgen
tool used to generate cobra docs from the website repo currently uses execssed
to replace the local directory (created in docs by the cobra module) with<WORKDIR>
.Unfortunately
sed
works differently inmacOS
andlinux
for the usage we need. This PR removes sed usage entirely and we will do the replacement in the website'sMakefile
target itself where we will check for the OS and use the different variants.We backport to all supported versions since we can be generating docs for any of them.
Related Issue(s)
Checklist
Deployment Notes