feat: ask whether to make commit
All checks were successful
release / Release (push) Successful in 14s

This commit is contained in:
2025-05-12 09:52:42 +02:00
parent 7f61a55338
commit 9275f19a26

View File

@ -28,6 +28,11 @@ project_name:
type: str type: str
help: What is your project name? help: What is your project name?
make_commit:
type: bool
help: would you like to automatically stage and commit the changes?
default: true
widget_plugins_input: widget_plugins_input:
# Defines the list of plugin widgets, following: # Defines the list of plugin widgets, following:
# - name: widget name in snake case # - name: widget name in snake case
@ -83,8 +88,12 @@ _tasks:
{% endfor %} {% endfor %}
{% endif %} {% endif %}
- > - >
{% if make_commit %}
{% if _copier_operation == 'copy' %} {% if _copier_operation == 'copy' %}
git add -A; git commit -a -m 'Init repo {{ project_name }} at template version {{ _commit }}' git add -A; git commit -a -m 'Init repo {{ project_name }} at template version {{ _commit }}'
{% else %} {% else %}
git add -A; git commit -a -m 'Update repo with template version {{ _commit }}' git add -A; git commit -a -m 'Update repo with template version {{ _commit }}'
{% endif %} {% endif %}
{% else %}
echo "Autocommit disabled, leaving repo dirty"
{% endif %}