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
Add generate-{cask,formula}-api commands #14762
Conversation
These replace the similar scripts in formulae.brew.sh. Part of #14730.
Review period will end on 2023-02-23 at 15:35:40 UTC. |
Replace the scripts in this repository. Depends on Homebrew/brew#14762 Fixes Homebrew/brew#14730
Will take a look this evening. Am I correct in this doesn't replace the Jekyll generation of some of the JSONs? |
@Bo98 No rush! Yeh, the e.g. Homebrew/formulae.brew.sh#776 contains the formulae.brew.sh parts so you can see what gets removed over there based on this. |
Replace the scripts in this repository. Depends on Homebrew/brew#14762 Fixes Homebrew/brew#14730
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.
This looks great, thanks for working on this!
One non-blocking suggestion:
Thoughts on also creating a I think a lot of the logic in that command would be similar to what we're doing here |
def html_template(title) | ||
<<~EOS | ||
--- | ||
title: #{title} | ||
layout: cask | ||
--- | ||
{{ content }} | ||
EOS |
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.
The bit of Jekyll HTML template here feels really weird (particularly since this is not really the API itself) and am not a fan of it here. If it turns out to really be the only way to do it though then fair enough.
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.
@Bo98 Again: game to not do this. It's slightly nicer than a .gsub
to make this a function, IMO.
JSON_TEMPLATE = <<~EOS | ||
--- | ||
layout: cask_json | ||
--- | ||
{{ content }} | ||
EOS |
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 think eventually it would be nice to just bypass Jekyll for the JSON stuff tbh. Would make the JWS signing stuff an easy move here.
Review period skipped due to |
Yeh, having it in |
Co-authored-by: Rylan Polster <rslpolster@gmail.com> Co-authored-by: Bo Anderson <mail@boanderson.me>
204d6bb
to
9c9213a
Compare
Marking as |
These replace the similar scripts in formulae.brew.sh.
Part of #14730.
See also Homebrew/formulae.brew.sh#776