Add in prompt for itch-project name. #184
Merged
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.
We now ask for the project name on itch.io if the user provides a username for itch.io. This is optional, and if left-blank we fallback to project-name.
I have to do this weirdly because I can't use template placeholders in
cargo-generate.toml
for defaults, as far as I could tell. We could create some hooks, but that is complicated and there are some issues we could run-into so I went this route instead so we wouldn't have to worry as much about it.To elaborate on the issues with hooks, I'm specifically talking about
init
hooks.init
can have access toproject-name
but it is not guaranteed. So we would have to babysit running order, which can be an issue. Additionally, I'm not completely certain on if they run after the prompt, before the prompt, or during the prompt. In which case we might still run into issues depending on how fast the user moves and all that.If we run using
pre
hooks, then it runs after the prompt as far as I can tell..which means the default wouldn't be shown to the user anyway, which is the same as the current behavior. The only advantage ofpre
hooks would be that we can eliminate a branch in the release workflow.