-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Feature] Run commands after scaffold completion #188
Comments
It's a feature on my TODO list since the start. I never work on it due to priority and some issues & questions (your point of view is welcome):
The first/next step that I plan is to allow template to include a notice messages to display at the end of the generation. This message could include command and ask user to copy/paste them. WDYT ? |
👍
maybe do a topological sorting of the nodes? However there might be the cases when user might want to override the order.
To somewhat abstract OS differences one could write something like
OR (easier to implement but might be not a good choice long term)
|
Hi, The ffizer 2.x (beta currently) include a basic support for commands: like scripts:
- cmd: |
{{#if (eq (env_var "OS") "windows") }}
echo Hello {{ who }}> file2.txt
del file_to_delete.txt
{{else}}
echo "Hello {{ who }}" > file2.txt
rm file_to_delete.txt
{{/if}} extracted from https://github.com/ffizer/ffizer/blob/master/tests/data/test_3/template/.ffizer.yaml |
Thank you. It compiles. I'll test it after I figure out how to make a release locally. I am new to Rust and currently learning it. I wanted to figure out how your build setup is working. It is very awesome. Looks like somehow you use github actions locally. Do you have a ffizer templates for rust projects? |
Welcome to Rust Land FYI the pre-built binaries are available under github/release or you can update you local ffizer with If you compile from source, you can use the regular cargo command:
My usage of cargo make is for "advanced" tasks. I have a rust template (but it's obsoleted no ci,... , I'll update it then add it to ffizer organization): https://github.com/davidB/templates. |
I have an other rust template but more specialized at https://gitlab.com/davidB31/cg-starter-multi-rust I have duplication between them, after release of the version 2 I plan to remove duplication and to re-create them as composition of templates (one the unique features of ffizer I think) |
Usually when new project is started there is a need to run some initialization commands, such as for example:
It would be nice to be able to run the commands automatically or be able to print them (and suppress all other output) to pipe into sh.
I.e. the scaffold command would look like
ffizer apply --source <source_dir> --destination <dest_dir> | sh
.The text was updated successfully, but these errors were encountered: