Skip to content
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 make -help commands #231

Open
milesfrain opened this issue Aug 29, 2020 · 5 comments
Open

Add make -help commands #231

milesfrain opened this issue Aug 29, 2020 · 5 comments
Labels
cookbook Issues related to this repo as a whole and not a recipe in particular

Comments

@milesfrain
Copy link
Collaborator

Show all available commands for a recipe with something like:

make MyRecipeName-help

Planning to pull out the command-printing code from scripts/newRecipe.sh into a scripts/showHelp.sh, and call this new script from both the original newRecipe.sh script and the makefile.

@milesfrain milesfrain added the cookbook Issues related to this repo as a whole and not a recipe in particular label Aug 29, 2020
@JordanMartinez
Copy link
Owner

To clarify, I thought the command would just be make help, not make RecipeName-help. What happens if you forget what the recipe was called / the recipe name you chose?

@milesfrain
Copy link
Collaborator Author

milesfrain commented Aug 29, 2020

If you don't specify the recipe name, then we won't be able to provide copy-pastable make commands (which need to have the recipe name in them). So we could provide a command reference with a generic MyRecipeName placeholder, or just show the suffixes, but then we'll likely be showing some invalid commands. The existing scripts/newRecipe.sh customizes the displayed commands based on recipe type, for example whether to show -node or -web, etc.

We could do something tricky to guess what recipe they need help with, such as looking for the newest recipe directory. But I think it's better to just require the recipe name.

What happens if you forget what the recipe was called / the recipe name you chose?

I feel like this is unlikely, since you have at least 3 ways to figure this out:

  • check command history
  • check git status
  • sort recipes by date: ls -lrt recipes

@JordanMartinez
Copy link
Owner

Good points. Thanks for your feedback.

Perhaps this problem could be resolved differently. When we run make or make list, we could update the output to say:

Run `make <RecipeName>-<target>` run a recipe named `RecipeName` via the target, `target`.

Run `make <RecipeName>-help` to see a list of all copy-and-paste commands 
for a given recipe. For example `make HelloWorld-help`.

=== Node Recipes ===
...
That would solve the "general help" message people would see while still making the "specific help" message better.

@milesfrain
Copy link
Collaborator Author

Yes, that sounds good. Although the the make/make list output is pretty long now, so I don't think users will see a note at the top. Maybe we put it at the bottom.

@JordanMartinez
Copy link
Owner

Yeah, bottom sounds like a better idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cookbook Issues related to this repo as a whole and not a recipe in particular
Projects
None yet
Development

No branches or pull requests

2 participants