From 67305675263e5aa8b4cde95ae73f74046e7f8a71 Mon Sep 17 00:00:00 2001 From: perl_d Date: Tue, 27 May 2025 11:07:54 +0200 Subject: [PATCH] fix(tasks): run commit task as migration for UD --- copier.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/copier.yml b/copier.yml index 3c565c7..d06af05 100644 --- a/copier.yml +++ b/copier.yml @@ -79,18 +79,33 @@ ui_fileinfo: # would like to save this programatically when generated but don't _tasks: - "{% if _copier_operation == 'copy' %} git init --initial-branch=main {% endif %}" - > - {% if not ui_fileinfo %} echo "No .ui files to process" + {% if not ui_fileinfo %} echo "No .ui files to process"; {% else %} {% for info in ui_fileinfo %}pyside6-uic {{ info.ui_file }} -o {{ info.out_file }}; {% endfor %} {% endif %} - > {% if make_commit %} + echo "making autocommit in $(pwd)"; {% if _copier_operation == 'copy' %} git add -A; git commit -a -m 'Init repo {{ project_name }} at template version {{ _commit }}' - {% else %} - git add -A; git commit -a -m 'Update repo with template version {{ _commit }}' {% endif %} {% else %} echo "Autocommit disabled, leaving repo dirty" - {% endif %} \ No newline at end of file + {% endif %} + +_migrations: + - stage: after + command: > + {% if make_commit %} + echo "making autocommit in $(pwd)"; + {% if _copier_operation == 'copy' %} + git add -A; git commit -a -m 'Init repo {{ project_name }} at template version {{ _commit }}' + {% else %} + git add -A; git commit -a -m 'Update repo with template version {{ _commit }}' + {% endif %} + {% else %} + echo "Autocommit disabled, leaving repo dirty" + {% endif %} + - stage: after + command: pre-commit install \ No newline at end of file