-
Notifications
You must be signed in to change notification settings - Fork 179
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
Create a tool to extract a bash script from a Linera README file #3114
Conversation
linera-service/src/util.rs
Outdated
|
||
pub fn path(&self) -> &Path { | ||
&self.path | ||
impl Markdown<std::io::BufReader<fs_err::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.
(Nit: I'd use std::io
and remove all those std::
.)
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.
Not sure I like use std::io
so much. I added a few others instead.
linera-service/src/util.rs
Outdated
) -> std::io::Result<Vec<String>> { | ||
let mut result = Vec::new(); | ||
let mut lines = reader.lines(); | ||
) -> Result<(), std::io::Error> { |
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.
) -> Result<(), std::io::Error> { | |
) -> io::Result<()> { |
linera-service/src/util.rs
Outdated
output, | ||
"JSON_QUERY=$(jq -n --arg q \"$QUERY\" '{{\"query\": $q}}')" | ||
)?; | ||
writeln!(output, "QUERY_RESULT=$(curl -w '\\n' -g -X POST -H \"Content-Type: application/json\" -d \"$JSON_QUERY\" {uri} \ |
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.
(Line too long.)
Motivation
This was suggested by the community and team members also hacked a local solution at times.
fixes #1456
Proposal
linera extract-script-from-markdown
. The command is hidden because we may arbitrarily change or remove it in the future.Test Plan
CI
Release Plan