2 Commits

Author SHA1 Message Date
4456f21f90 0.4.0
Automatically generated by python-semantic-release
2025-05-12 08:28:09 +00:00
9275f19a26 feat: ask whether to make commit
All checks were successful
release / Release (push) Successful in 14s
2025-05-12 10:27:35 +02:00
2 changed files with 17 additions and 0 deletions

View File

@ -1,6 +1,14 @@
# CHANGELOG # CHANGELOG
## v0.4.0 (2025-05-12)
### Features
- Ask whether to make commit
([`9275f19`](https://gitea.psi.ch/bec/bec_plugin_copier_template/commit/9275f19a263d8386c4e29efc28803e3f8ff67a44))
## v0.3.6 (2025-05-09) ## v0.3.6 (2025-05-09)
### Bug Fixes ### Bug Fixes

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 %}